CVE-2024-45409 The Ruby SAML library vulnerable to a SAML authentication bypass via Incorrect XPath selector

Critical 10.0 Published Updated

An unauthenticated attacker can forge SAML responses to log in as any user due to improper signature verification in the Ruby SAML library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-45409?

CVE-2024-45409 is a critical authentication bypass vulnerability in Gitlab Gitlab, published on 10 Sep 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The Ruby SAML library is for implementing the client side of a SAML authorization. Ruby-SAML in <= 12.2 and 1.13.0 <= 1.16.0 does not properly verify the signature of the SAML Response. An unauthenticated attacker with access to any signed saml document (by the IdP) can thus forge a SAML Response/Assertion with arbitrary contents. This would allow the attacker to log in as arbitrary user within the vulnerable system. This vulnerability is fixed in 1.17.0 and 1.12.3.

Weakness: CWE-347

Which versions are affected by CVE-2024-45409?

5 open source packages ship an affected version, including gitlab and ruby-saml. It affects 3 products.

PackageAffectedFixed in
gitlab BitnamiAll versions16.11.10, 17.0.8, 17.1.8, 17.2.7, 17.3.3
ruby-saml RubyGemsAll versions1.12.3
ruby-saml RubyGemsAll versions1.12.3
ruby-saml RubyGemsFrom 1.13.01.17.0
ruby-saml RubyGemsFrom 1.13.01.17.0

Products include Gitlab Gitlab, Omniauth Omniauth Saml, Onelogin Ruby-Saml.

How do I fix CVE-2024-45409?

Upgrade gitlab to a fixed version for your release line: 16.11.10, 17.0.8, 17.1.8 or 17.2.7.

Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.

Is CVE-2024-45409 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-45409 exists.

Public exploit code: 2 proofs of concept on GitHub.

All Gitlab Gitlab vulnerabilities

Sources

Also known as BIT-gitlab-2024-45409, DEBIAN-CVE-2024-45409, DLA-3949-1, DSA-5774-1, GHSA-jw9c-mfg7-9rx2, UBUNTU-CVE-2024-45409.

Is CVE-2024-45409 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free