The Ruby SAML library vulnerable to a SAML authentication bypass via Incorrect XPath selector
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.
- Published
- Sep 10, 2024
- Updated
- Jun 17, 2026
- EPSS
- 10.7% · 96th percentile
- CWE
- CWE-347
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
42
Plan
Add it to your regular patch cycle.
- CVSS
- 39 / 40 · 9.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 3 / 30 · 10.7%
CISA SSVC decision
- Exploitation
- proof of concept
- Automatable
- yes
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 9.8
- CNA · GitHub_M
- 10.0
- 0.2 point gap
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| onelogin | ruby-saml | cpe:2.3:a:onelogin:ruby-saml |
| omniauth | omniauth saml | cpe:2.3:a:omniauth:omniauth_saml |
| gitlab | gitlab | cpe:2.3:a:gitlab:gitlab |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- gitlab gitlab17.3.0 and later · before 17.3.3
- gitlab gitlabbefore 16.11.10
- gitlab gitlab17.0.0 and later · before 17.0.8
- gitlab gitlab17.1.0 and later · before 17.1.8
- gitlab gitlab17.2.0 and later · before 17.2.7
- omniauth omniauth samlup to 1.10.3 inclusive
- omniauth omniauth saml2.0.0
- omniauth omniauth saml2.1.0
- onelogin ruby-samlbefore 1.12.3
- onelogin ruby-saml1.13.0 and later · before 1.17.0
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
SAML-Toolkits ruby-saml
- < 1.12.3, >= 1.13.0, < 1.17.0affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:11 | ruby-saml | before 1.11.0-1+deb11u1 | 1.11.0-1+deb11u1 |
| Debian:12 | ruby-saml | before 1.13.0-1+deb12u1 | 1.13.0-1+deb12u1 |
| RubyGems | omniauth-saml | from 2.0.0 · before 2.1.2 | 2.1.2 |
| RubyGems | omniauth-saml | from 2.2.0 · before 2.2.1 | 2.2.1 |
| RubyGems | omniauth-saml | before 1.10.5 | 1.10.5 |
| RubyGems | ruby-saml | from 1.13.0 · before 1.17.0 | 1.17.0 |
| RubyGems | ruby-saml | before 1.12.3 | 1.12.3 |
Same product
onelogin: all recordsOther highest-scoring records for the same primary product.
- CVE-2017-11428Multiple SAML libraries may allow authentication bypass via incorrect XML canonicalization and DOM traversal40Plan
- CVE-2015-20108xml_security.rb in the ruby-saml gem before 1.0.0 for Ruby allows XPath injection and code execution because prepared statements are not use39Monitor
- CVE-2025-66568ruby-saml Libxml2 Canonicalization errors can bypass Digest/Signature validation37Monitor
- CVE-2025-66567ruby-saml has a SAML authentication bypass due to namespace handling (parser differential)37Monitor
- CVE-2016-5697Ruby-saml before 1.3.0 allows attackers to perform XML signature wrapping attacks via unspecified vectors.30Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| SAML-Toolkits ruby-saml | 1.17.0 · description | Vendor (CNA) |
| Debian:ruby-saml | 1.13.0-1+deb12u1 · Debian:12 | Package registry (OSV) |
| RubyGems:omniauth-saml | 1.10.5 | Package registry (OSV) |
| RubyGems:omniauth-saml | 2.1.2 | Package registry (OSV) |
| RubyGems:omniauth-saml | 2.2.1 | Package registry (OSV) |
| RubyGems:ruby-saml | 1.12.3 | Package registry (OSV) |
| RubyGems:ruby-saml | 1.17.0 | Package registry (OSV) |
Exploit status
Proof of concept available
A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.
Evidence
- Nuclei detection template ×1
- Proof-of-concept repository on GitHub ×1
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Nuclei detection template | Nuclei template CVE-2024-45409 | — |
| Proof-of-concept repository on GitHub | stars:85 | 2024-10-07 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- Published
- First PoC+26 d
- TodaySep 29, 2026+749 d
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- CVE-2025-66567455 days apartruby-saml has a SAML authentication bypass due to namespace handling (parser differential)37Monitor
- CVE-2025-66568455 days apartruby-saml Libxml2 Canonicalization errors can bypass Digest/Signature validation37Monitor
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
The product’s vendor appears in a public program. Matched by name; verify the scope text in the program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-347 · Improper Verification of Cryptographic SignatureCVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Root cause
The verifier takes the algorithm to verify with from the token’s own header. Untrusted data ends up deciding its own verification rule.
The bug in code
The whole CWE-347 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const claims = jwt.verify(token, publicKey);Fixed
const claims = jwt.verify(token, publicKey, { algorithms: ["RS256"], issuer: "https://id.example.com", audience: "portal",});Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
—
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- github.com/SAML-Toolkits/ruby-saml/commit/1ec5392bc506fe43a02dbb66b68741051c5ffeae
- github.com/SAML-Toolkits/ruby-saml/commit/4865d030cae9705ee5cdb12415c654c634093ae7
- github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-jw9c-mfg7-9rx2
- github.com/omniauth/omniauth-saml/security/advisories/GHSA-cvp8-5r8g-fhvq
- lists.debian.org/debian-lts-announce/2024/11/msg00006.html
- news.ycombinator.com/item?id=41586031
- security.netapp.com/advisory/ntap-20240926-0008/
- ssoready.com/blog/engineering/ruby-saml-pwned-by-xml-signature-wrapping-attacks/
Vendor advisories and official records. Exploit/PoC links are deliberately left out.