{"vuln_id":"CVE-2026-63182","aliases":["GHSA-w553-pwx6-3mg9"],"description":"lightsaml allows Signature wrapping bypass","published_at":"2026-11-16T22:08:38Z","modified_at":"2026-11-16T22:15:05.631069Z","first_seen_at":"2026-11-21T19:15:20.238603Z","severity":"high","severity_source":"ghsa","cvss_score":8.1,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","cwe":["CWE-347"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00247,"epss_percentile":0.16055,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-63182"},"matched_alias":null,"items":[{"id":11111,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-w553-pwx6-3mg9: lightsaml allows Signature wrapping bypass","summary":"lightsaml allows Signature wrapping bypass\n\n### Summary\n\nLightSaml 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.\n\nAn attacker who has captured one genuine signed assertion can exploit this to surface attacker-authored, unsigned claims.\n\n### Details\n\n`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):\n\nhttps://github.com/litesaml/lightsaml/blob/5.0.0/src/Model/Protocol/Response.php#L122\nhttps://github.com/litesaml/lightsaml/blob/5.0.0/src/Model/AbstractSamlModel.php#L93\nhttps://github.com/litesaml/lightsaml/blob/5.0.0/src/Action/Assertion/Inbound/AssertionSignatureValidatorAction.php#L28\n\nThe check delegates to xmlseclibs `XMLSecurityDSig::validateReference()`, which first removes the signature node being validated from the shared document (enveloped-signature removal):\n\n```php\nif (! $docElem->isSameNode($this->sigNode)) {\nif ($this->sigNode->parentNode != null) {\n$this->sigNode->parentNode->removeChild($this->sigNode); // strips sig from shared DOM\n}\n}\n```\n\nhttps://github.com/robrichards/xmlseclibs/blob/3.1.5/src/XMLSecurityDSig.php#L596\n\n`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:\n\n```php\n$query = '//*['.$iDlist.']';\n$dataObject = $xPath->query($query)->item(0);\n```\n\nhttps://github.com/robrichards/xmlseclibs/blob/3.1.5/src/XMLSecurityDSig.php#L525\n\nSo 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:\n\nhttps://github.com/litesaml/lightsaml/blob/5.0.0/src/Model/Assertion/Assertion.php#L288\n\nAn 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`:\n\n```xml","url":"https://osv.dev/vulnerability/GHSA-w553-pwx6-3mg9","published_at":"2026-11-16T22:08:38Z","updated_at":"2026-11-16T22:15:05.631069Z","fetched_at":"2026-11-21T19:15:55.946437Z","severity":"high","cvss_score":8.1,"epss":0.00247,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"litesaml/lightsaml","vuln_id":"CVE-2026-63182","vuln_ids":["CVE-2026-63182","GHSA-W553-PWX6-3MG9"],"tags":["osv","packagist","fix-available"],"cluster_id":2411,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/11111","html":"https://vulnwatch.ve1ve2.com/item/11111"}},{"id":2486,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-w553-pwx6-3mg9 / CVE-2026-63182: lightsaml allows Signature wrapping bypass","summary":"lightsaml allows Signature wrapping bypass\n\n### Summary\n\nLightSaml 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.\n\nAn attacker who has captured one genuine signed assertion can exploit this to surface attacker-authored, unsigned claims.\n\n### Details\n\n`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):\n\nhttps://github.com/litesaml/lightsaml/blob/5.0.0/src/Model/Protocol/Response.php#L122\nhttps://github.com/litesaml/lightsaml/blob/5.0.0/src/Model/AbstractSamlModel.php#L93\nhttps://github.com/litesaml/lightsaml/blob/5.0.0/src/Action/Assertion/Inbound/AssertionSignatureValidatorAction.php#L28\n\nThe check delegates to xmlseclibs `XMLSecurityDSig::validateReference()`, which first removes the signature node being validated from the shared document (enveloped-signature removal):\n\n```php\nif (! $docElem->isSameNode($this->sigNode)) {\nif ($this->sigNode->parentNode != null) {\n$this->sigNode->parentNode->removeChild($this->sigNode); // strips sig from shared DOM\n}\n}\n```\n\nhttps://github.com/robrichards/xmlseclibs/blob/3.1.5/src/XMLSecurityDSig.php#L596\n\n`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:\n\n```php\n$query = '//*['.$iDlist.']';\n$dataObject = $xPath->query($query)->item(0);\n```\n\nhttps://github.com/robrichards/xmlseclibs/blob/3.1.5/src/XMLSecurityDSig.php#L525\n\nSo 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:\n\nhttps://github.com/litesaml/lightsaml/blob/5.0.0/src/Model/Assertion/Assertion.php#L288\n\nAn 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`:\n\n```xml","url":"https://github.com/advisories/GHSA-w553-pwx6-3mg9","published_at":"2026-11-16T22:08:38Z","updated_at":"2026-11-16T22:08:39Z","fetched_at":"2026-11-21T19:15:18.416875Z","severity":"high","cvss_score":8.1,"epss":0.00247,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"litesaml/lightsaml","vuln_id":"CVE-2026-63182","vuln_ids":["CVE-2026-63182","GHSA-W553-PWX6-3MG9"],"tags":["ghsa","composer","CWE-347"],"cluster_id":2411,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2486","html":"https://vulnwatch.ve1ve2.com/item/2486"}}]}