CVE-2026-46490

samlify: XML Injection in AttributeValue Allows Privilege Escalation in Signed SAML Assertions

Published Jun 8, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
samlify is a Node.js library for SAML single sign-on. Prior to version 2.13.0, samlify’s template substitution only escapes attribute contexts. Values inserted into element text (e.g., <saml:AttributeValue>) are not escaped. A normal user can inject XML markup into an attribute value (e.g., email, name) and add new <saml:Attribute> elements inside the signed assertion. The IdP then signs the tampered assertion and the SP accepts the injected attributes as trusted. This allows privilege escalation when attributes are used for authorization (roles/groups). This issue has been patched in version 2.13.0.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade samlify to version 2.13.0 or later so that all SAML component values are properly escaped before signing.
  • Configure your SAML processing logic to reject any SAML assertion that contains unexpected or malformed <saml:Attribute> elements, especially those originating from user input.
  • Perform integration testing of the authentication flow to verify that no injected attributes are accepted and that privilege escalation cannot be achieved.

Generated by OpenCVE AI on June 8, 2026 at 20:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-34r5-q4jw-r36m samlify: XML Injection in AttributeValue Allows Privilege Escalation in Signed SAML Assertions
History
Type Values Removed Values Added
First Time appeared Samlify Project
Samlify Project samlify
CPEs cpe:2.3:a:samlify_project:samlify:*:*:*:*:*:*:*:*
Vendors & Products Samlify Project
Samlify Project samlify
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Tngan
Tngan samlify
Vendors & Products Tngan
Tngan samlify
Type Values Removed Values Added
Description samlify is a Node.js library for SAML single sign-on. Prior to version 2.13.0, samlify’s template substitution only escapes attribute contexts. Values inserted into element text (e.g., <saml:AttributeValue>) are not escaped. A normal user can inject XML markup into an attribute value (e.g., email, name) and add new <saml:Attribute> elements inside the signed assertion. The IdP then signs the tampered assertion and the SP accepts the injected attributes as trusted. This allows privilege escalation when attributes are used for authorization (roles/groups). This issue has been patched in version 2.13.0.
Title samlify: XML Injection in AttributeValue Allows Privilege Escalation in Signed SAML Assertions
Weaknesses CWE-91
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-91

    XML Injection (aka Blind XPath Injection)

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 9, 2026, 3:13 PM
Reserved
May 14, 2026, 6:06 PM
Status
Analyzed
Published
Jun 8, 2026, 7:16 PM
Modified
Jul 23, 2026, 8:10 AM