SAML Signature-Validation Bypass via Nokogiri Canonicalization Error Handling
Nokogiri versions before 1.19.1 fail to check the return value of xmlC14NExecute in the CRuby extension's canonicalize method. When XML canonicalization fails, the method returns an empty string instead of raising an exception. Downstream SAML libraries that fail to detect this error can incorrectly accept invalid XML during signature validation, enabling signature-validation bypass. JRuby implementations are not affected.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Affected downstream SAML applications can incorrectly accept XML whose signature validation should fail, compromising the integrity of signature-based security decisions. Authentication or authorization consequences depend on how the application uses the accepted SAML data.
If you can’t patch tonight, do this now.
Until an upgrade is possible, independently detect canonicalization failures and ensure downstream SAML/XML signature-validation code rejects empty or invalid canonicalization results. Do not assume canonicalization failures will raise exceptions.
Patch, then assume compromise.
Upgrade the nokogiri RubyGem to version 1.19.1 or later in affected CRuby deployments. Ensure applications load the updated dependency. JRuby implementations do not require remediation for this vulnerability.
No public exploits tracked yet. Mallory keeps watching.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
2 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.