Vulnerability · Published Sep 10, 2024 · Assigned by GitHub_M
CVE-2024-45409The Ruby SAML library vulnerable to a SAML authentication bypass via Incorrect XPath selector
Critical 10.0
In plain English
A critical-severity security flaw in ruby-saml from SAML-Toolkits. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 10.7% (higher than 96% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | ruby-saml | 1.13.0-1+deb12u1 | DEBIAN-CVE-2024-45409 |
| Debian:12 | ruby-saml | 1.13.0-1+deb12u1 | DSA-5774-1 |
| RubyGems | ruby-saml | 1.12.3 | GHSA-jw9c-mfg7-9rx2 |
| RubyGems | ruby-saml | 1.17.0 | GHSA-jw9c-mfg7-9rx2 |
| Ubuntu:22.04:LTS | ruby-saml | 1.13.0-1ubuntu0.1 | USN-7309-1 |
| Ubuntu:22.04:LTS | ruby-saml | 1.13.0-1ubuntu0.1 | UBUNTU-CVE-2024-45409 |
| Ubuntu:24.04:LTS | ruby-saml | 1.15.0-1ubuntu0.24.04.1 | UBUNTU-CVE-2024-45409 |
| Ubuntu:24.04:LTS | ruby-saml | 1.15.0-1ubuntu0.24.04.1 | USN-7309-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| SAML-Toolkits | ruby-saml | < 1.12.3>= 1.13.0, < 1.17.0 |
Weakness: CWE-347 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
References
- https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-jw9c-mfg7-9rx2 x_refsource_CONFIRM
- https://github.com/omniauth/omniauth-saml/security/advisories/GHSA-cvp8-5r8g-fhvq x_refsource_MISC
- https://github.com/SAML-Toolkits/ruby-saml/commit/1ec5392bc506fe43a02dbb66b68741051c5ffeae x_refsource_MISC
- https://github.com/SAML-Toolkits/ruby-saml/commit/4865d030cae9705ee5cdb12415c654c634093ae7 x_refsource_MISC
- https://ssoready.com/blog/engineering/ruby-saml-pwned-by-xml-signature-wrapping-attacks/
- https://news.ycombinator.com/item?id=41586031
- https://security.netapp.com/advisory/ntap-20240926-0008/
- https://lists.debian.org/debian-lts-announce/2024/11/msg00006.html