GHSL-2024-329_GHSL-2024-330: Authentication bypasses in ruby-saml - CVE-2025-25291, CVE-2025-25292
Two authentication bypasses in ruby-saml stem from parser differentials between Nokogiri and REXML, allowing an attacker with a valid signed SAML assertion to impersonate another user. The issues involve DOCTYPE handling and namespace handling, both leading to authentication bypass.
Due to their nature of both being parser differentials it made sense to solve them both at the same time.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the use of two different XML parsers (Nokogiri and REXML) that produce different document structures for the same input, causing XPath queries to return different nodes.
Impact
This issue may lead to authentication bypass, allowing an attacker with a valid signed SAML assertion to impersonate another user.
What the attacker needed
A valid signed SAML assertion
The fix
Fixed versions of ruby-saml were released.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
SAML is a way for websites to let you log in using an account from another service. This report found that the library checking those logins could be tricked into accepting a forged login as someone else, if the attacker already had one valid login token. The problem was that two different parts of the library read the same XML data differently, so they disagreed about who the token belonged to.
What is OAuth / SSO?
Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.