# CVE-2026-46490: samlify: XML Injection in AttributeValue Allows Privilege Escalation in Signed SAML Assertions

> Attackers can inject XML into SAML attributes to escalate privileges by adding unauthorized roles or groups to signed assertions.

- **Severity:** High 8.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Jun 2026
- **Updated:** 9 Jun 2026
- **Also known as:** GHSA-34r5-q4jw-r36m, MINI-23f5-3fxq-p65m, MINI-9mcc-3mf4-rghp, MINI-hr54-82fj-cxr6, ROOT-APP-NPM-CVE-2026-46490

## What is CVE-2026-46490?

CVE-2026-46490 is a high-severity code injection vulnerability in tngan samlify, published on 8 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-91 (XML Injection)

## Which versions are affected by CVE-2026-46490?

2 open source packages ship an affected version, including samlify. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `samlify` | npm | All versions | 2.13.0 |
| `samlify` | npm | All versions | 2.13.0 |

Products: Samlify Project Samlify.

## How do I fix CVE-2026-46490?

Upgrade samlify to 2.13.0 or later.

## Is CVE-2026-46490 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-46490 exists.

Public exploit code:

- CVE-2026-46490 — samlify <2.13.0 SAML AttributeValue XML injection -> signed-assertion privilege escalation. Self-contained PoC, verified e2e. (github_poc): https://github.com/BiiTts/CVE-2026-46490-samlify-SAML-Attribute-Injection

## Other vulnerabilities in tngan samlify

- [CVE-2025-47949](https://insights.sbomify.com/CVE-2025-47949/): samlify SAML Signature Wrapping attack (critical 9.9)
- [CVE-2017-1000452](https://insights.sbomify.com/CVE-2017-1000452/): Samlify vulnerable to Authentication Bypass by allowing tokens to be reused with different usernames (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-46490 and fix it if it is affected.

What it is: CVE-2026-46490 is a high-severity code injection vulnerability in tngan samlify, published on 8 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-46490 exists.

Affected packages and fixed versions:
- samlify (npm): affected all versions; fixed in 2.13.0
- samlify (npm): affected all versions; fixed in 2.13.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-46490/ (Markdown: https://insights.sbomify.com/CVE-2026-46490/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-46490
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-46490
- OSV: https://osv.dev/vulnerability/CVE-2026-46490

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-46490/
Summaries are generated and may contain mistakes; the official description above is the record.
