# ruby-saml companion signature-wrapping bypass

Source: https://startwithidentity.com/cves/cve-2025-25292/
Last updated: 2026-08-29
License: content by Start with Identity. Cite the source URL.

---

## What broke

[CVE-2025-25292](https://nvd.nist.gov/vuln/detail/CVE-2025-25292) is the companion to [CVE-2025-25291](https://startwithidentity.com/cves/cve-2025-25291/): a second way to wrap a signed [SAML](https://startwithidentity.com/glossary/saml/) assertion so ruby-saml accepts an attacker-controlled NameID or attribute statement. Same root cause family (parser disagreement, CWE-347 improper verification of cryptographic signature), same March 2025 patch train.

The March fix did not hold. [CVE-2025-54572](https://startwithidentity.com/cves/cve-2025-54572/) is the incomplete-fix follow-on, and PortSwigger's December 2025 "The Fragile Lock" work produced [CVE-2025-66567](https://startwithidentity.com/cves/cve-2025-66567/) and [CVE-2025-66568](https://startwithidentity.com/cves/cve-2025-66568/).

## Why it matters

If you patched 25291 and assumed you were done, you were not. Signature wrapping is a class, not a single line of code. Identity teams that treat each ruby-saml CVE as a one-time ticket will keep reopening it.

## What to do

- Treat the ruby-saml series as one upgrade: land on 1.18.1 or later, not on the first patched minor.
- After any SAML library upgrade, rotate signing certificates at the [identity provider](https://startwithidentity.com/glossary/identity-provider/).
- Add a detection story: SSO assertions whose signed XML and consumed XML do not match, or logins whose NameID never appeared in a prior valid assertion for that session.

## After you patch

A SAML bypass means the service provider accepted an assertion it should have rejected, so anyone who exploited it authenticated as a real user and left a normal-looking log line.

- **Revoke every session** issued by the affected service provider, then rotate its session signing keys. Patching stops new forgeries and does nothing about sessions already minted.
- **Audit administrative accounts and group memberships** for changes during the exposure window. Signing in as an administrator is the point of this class, and adding a second account is the standard persistence step.
- **Rotate the identity provider signing certificate** if the flaw involved signature validation, and confirm the service provider pins the expected certificate rather than trusting anything in the assertion.
- **Check your own implementation for the same class**: exact-match comparison on verification results, rejection of unexpected signature algorithms, and audience and recency checks on every assertion. See [SAML 2.0](https://startwithidentity.com/standards/saml-2-0/) and [SAML vs OIDC](https://startwithidentity.com/guides/fundamentals/saml-vs-oidc/).

## Sources

- [NVD: CVE-2025-25292](https://nvd.nist.gov/vuln/detail/CVE-2025-25292)
