ruby-saml vulnerable to SAML authentication bypass due to DOCTYPE handling (parser differential)
ruby-saml provides security assertion markup language (SAML) single sign-on (SSO) for Ruby. An authentication bypass vulnerability was found in ruby-saml prior to versions 1.12.4 and 1.18.0 due to a parser differential. ReXML and Nokogiri parse XML differently; the parsers can generate entirely different document structures from the same XML input. That allows an attacker to be able to execute a Signature Wrapping attack. This issue may lead to authentication bypass. Versions 1.12.4 and 1.18.0 fix the issue.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-25291
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 14:34 UTC · Revision 1
Source evidence
ruby-saml vulnerable to SAML authentication bypass due to DOCTYPE handling (parser differential)
core-osv · Original sourcePublished 12 Mar 2025, 20:16 UTC
ruby-saml provides security assertion markup language (SAML) single sign-on (SSO) for Ruby. An authentication bypass vulnerability was found in ruby-saml prior to versions 1.12.4 and 1.18.0 due to a parser differential. ReXML and Nokogiri parse XML differently; the parsers can generate entirely different document structures from the same XML input. That allows an attacker to be able to execute a Signature Wrapping attack. This issue may lead to authentication bypass. Versions 1.12.4 and 1.18.0 fix the issue.
osv:CVE-2025-25291
Complete source record
{
"id": "384281a2b41da3e8c74804482c01242e090a99e665b78328937d00443b1fa906",
"url": "https://osv.dev/vulnerability/CVE-2025-25291",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "ruby-saml vulnerable to SAML authentication bypass due to DOCTYPE handling (parser differential)",
"summary": "ruby-saml provides security assertion markup language (SAML) single sign-on (SSO) for Ruby. An authentication bypass vulnerability was found in ruby-saml prior to versions 1.12.4 and 1.18.0 due to a parser differential. ReXML and Nokogiri parse XML differently; the parsers can generate entirely different document structures from the same XML input. That allows an attacker to be able to execute a Signature Wrapping attack. This issue may lead to authentication bypass. Versions 1.12.4 and 1.18.0 fix the issue.",
"evidence": "osv:CVE-2025-25291",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2025-25291",
"aliases": [
"BIT-gitlab-2025-25291",
"CVE-2025-25291",
"GHSA-4vc4-m8qh-g8jm"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/omniauth/omniauth-saml",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "1075827eb7d7b0926920c9b452f756d18de6deab"
},
{
"introduced": "ed52758c272f5afe81e3304d1f4e436e30021a2a"
},
{
"fixed": "2eb30faada7936b2e2188e47a5b768f5643e6eae"
},
{
"introduced": "4274e9d57e65f2dcaae4aa3b2accf831494f2ddd"
},
{
"fixed": "34eb3541248e4ee56fa2189bd7b47f4748fe2f78"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:omniauth:omniauth_saml:*:*:*:*:*:ruby:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.10.6"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:omniauth:omniauth_saml:*:*:*:*:*:ruby:*:*",
"range": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.1.3"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:omniauth:omniauth_saml:*:*:*:*:*:ruby:*:*",
"range": [
{
"introduced": "2.2.0"
},
{
"fixed": "2.2.3"
}
],
"source": "CPE_RANGE"
}
]
}
},
{
"repo": "https://github.com/saml-toolkits/ruby-saml",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "48cc5b92e1dde8637a013dfd48cdf8ceadd499b2"
},
{
"introduced": "5da850c36bbf678674f9321032df428139d7e434"
},
{
"fixed": "6a7c040049babe748ee1bb4ca13898c47189114c"
},
{
"fixed": "e76c5b36bac40aedbf1ba7ffaaf495be63328cd9"
},
{
"fixed": "e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:onelogin:ruby-saml:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.12.4"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:onelogin:ruby-saml:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "1.13.0"
},
{
"fixed": "1.18.0"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "e76c5b36bac40aedbf1ba7ffaaf495be63328cd9"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "48cc5b92e1dde8637a013dfd48cdf8ceadd499b2"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v1.12.4"
},
{
"range": [
{
"fixed": "6a7c040049babe748ee1bb4ca13898c47189114c"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v1.18.0"
}
]
}
}
],
"versions": [
"v2.1.2",
"v1.10.5",
"v1.10.4",
"v1.10.3",
"v2.1.1",
"v2.1.0",
"v2.0.0",
"v1.10.2",
"v1.10.1",
"v1.10.0",
"v1.9.0",
"v1.8.1",
"v1.8.0",
"v1.7.0",
"v1.6.0",
"v1.5.0",
"v1.4.2",
"v1.4.1",
"v1.4.0",
"v1.3.1",
"v1.3.0",
"v1.2.0",
"v1.1.0",
"v1.0.0",
"v0.9.2",
"v0.9.1",
"v0.9.0",
"v1.12.3",
"v1.17.0",
"v1.12.2",
"v1.16.0",
"v1.15.0",
"v1.14.0",
"v1.12.1",
"v1.12.0",
"v1.11.0",
"v1.7.2",
"v1.7.1",
"v1.6.2",
"v1.6.1",
"1.4.3",
"1.5.0",
"1.4.2",
"1.4.1",
"1.4.0",
"1.3.1",
"v1.1.2",
"v1.1.1",
"v0.9",
"0.8.1",
"0.8.0",
"0.7.3",
"v0.7.1",
"v0.6.0",
"v0.5.3",
"v0.5.2",
"v0.5.1",
"v0.5.0",
"v0.4.7",
"v0.4.6",
"v0.4.5",
"v0.4.4",
"v0.4.3",
"v0.4.2",
"v0.4.1",
"v0.4.0",
"v0.3.4",
"v0.3.3",
"v0.3.2",
"v0.3.1",
"v0.3.0",
"v0.2.3",
"v0.2.2",
"v0.2.1",
"v0.2.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-25291.json"
}
}
],
"modified": "2026-10-28T02:30:29.522541123Z",
"provider": "osv",
"references": [
"https://about.gitlab.com/releases/2025/03/12/patch-release-gitlab-17-9-2-released",
"https://github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.12.4",
"https://github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.18.0",
"https://lists.debian.org/debian-lts-announce/2025/04/msg00011.html",
"https://news.ycombinator.com/item?id=43374519",
"https://portswigger.net/research/saml-roulette-the-hacker-always-wins",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/25xxx/CVE-2025-25291.json",
"https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-4vc4-m8qh-g8jm",
"https://github.com/omniauth/omniauth-saml/security/advisories/GHSA-hw46-3hmr-x9xv",
"https://nvd.nist.gov/vuln/detail/CVE-2025-25291",
"https://security.netapp.com/advisory/ntap-20250314-0010/",
"https://securitylab.github.com/advisories/GHSL-2024-329_GHSL-2024-330_ruby-saml",
"https://github.com/SAML-Toolkits/ruby-saml/commit/e76c5b36bac40aedbf1ba7ffaaf495be63328cd9",
"https://github.com/SAML-Toolkits/ruby-saml/commit/e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97",
"https://github.blog/security/sign-in-as-anyone-bypassing-saml-sso-authentication-with-parser-differentials"
],
"provider_metadata": {
"cwe_ids": [
"CWE-347",
"CWE-436"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/25xxx/CVE-2025-25291.json"
}
},
"related_cves": [
{
"value": "CVE-2025-25291",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 496408,
"published_at": "2025-03-12T20:16:12.181+00:00"
}