CWE-347: Improper Verification of Cryptographic Signature
5 real-world CVEs classified as CWE-347: Improper Verification of Cryptographic Signature. Each one is a short hands-on exercise in Hexret: find the vulnerable line, follow the exploit and learn the fix.
- CVE-2025-25291critical 9.82025
ruby-saml SAML authentication bypass via parser differential (sign in as anyone)
A signed-XML verifier parses the same document with two different XML parsers and splits its trust across both, so a DOCTYPE-wrapped response lets one parser validate the signature over legitimate content while another reads a forged assertion.
- CVE-2024-45409critical 10.02024
ruby-saml incorrect XPath signature verification bypass
Absolute descendant XPath queries could select a digest from outside the signed Reference, allowing a forged digest to validate modified assertion content while the library separately verified an untouched, legitimately signed SignedInfo block.
- CVE-2022-47966critical 9.82023
ManageEngine SAML reference-transform execution before signature trust
ManageEngine products processed XML Signature Reference transforms before proving the SignedInfo signature authentic. An unsigned SAML response could therefore make Apache Santuario execute an attacker-controlled XSLT transform, and the Java XSLT environment exposed extension functions capable of invoking Java classes.
- CVE-2015-9235critical 9.82018
JWT algorithm confusion: verifier trusts the token's alg header
A token verifier that takes the signature algorithm from the token header lets an attacker downgrade RS256 to HS256 and sign with the RSA public key as the HMAC secret, forging any token.
- CVE-2018-0114high 7.52018
node-jose embedded-JWK signature forgery
The JWS verifier resolves its verification key from the token's own header, so an attacker embeds a public key they own, re-signs with the matching private key, and the forged token verifies as valid.