Impact
samify implements SAML single sign‑on for Node.js. Prior to version 2.13.0 the library escaped only attribute contexts during template substitution; the value of an element such as <saml:AttributeValue> was inserted into the signed assertion without escaping. This allows an attacker to inject raw XML into an attribute value that the identity provider signs and the service provider trusts. The injected XML can introduce new <saml:Attribute> elements such as roles or groups, giving the attacker elevated privileges or unauthorized access when those attributes are used for authorization.
Affected Systems
The vulnerability affects the samlify library provided by tngan. Any application using samlify version 2.12.x or earlier and processing SAML assertions that derive attribute values from untrusted input is affected. The issue is resolved in version 2.13.0 and later of samlify.
Risk and Exploitability
The CVSS score of 8.7 indicates high severity. No EPSS score is available, and the vulnerability is not listed in the CISA KEV catalog. The attack requires that an attacker can influence the content of an attribute value that will be embedded in a SAML assertion, typically by manipulating input passed to samlify. The attacker then obtains a signed assertion containing forged attributes; the service provider accepts these attributes as trusted, resulting in privilege escalation. This exploit is practical in scenarios where SAML assertions are signed by a trusted identity provider and attributes are used for authorization decisions.
OpenCVE Enrichment
Github GHSA