CVE-2026-75522: OpenID4VP X.509 Chain Validation Accepts A Vulnerability

HIGH
Advisory Identifier: GHSA-4c2f-96cf-f5fc
CVSS 7.5
CWE-295 CWE-347
Published
Advisory Summary

CVE-2026-75522 is a HIGH (CVSS 7.5) x.509 chain validation accepts a vulnerability (CWE-295: Improper Certificate Validation) affecting OpenID4VP libraries in the npm ecosystem. The issue involves x.509 chain validation accepts a forged certificate that reuses a trusted anchor's subject dn without verifying its signature. Remediation is available by upgrading affected packages to version 0.8.1.

CVE-2026-75522 at a Glance

CVE Identifier CVE-2026-75522
GHSA Identifier GHSA-4c2f-96cf-f5fc
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-295: Improper Certificate Validation
Affected Product OpenID4VP
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-75522

To remediate this vulnerability, upgrade all affected OpenID4VP dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@openeudi/openid4vp fixed: 0.8.1
npm install @openeudi/openid4vp@0.8.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @openeudi/openid4vp

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-75522, inspect your project dependencies using npm:

npm ls @openeudi/openid4vp

Analyze the terminal output to locate any version of OpenID4VP in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.1), your application is affected.

Note: The npm ls @openeudi/openid4vp command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & RFC 5280 Specification

Under RFC 5280 specifications for X.509 certificates, the Name Constraints extension defines a namespace within which all subsequent subject names in a certification path must be located. Constraints apply to various name forms including directory names, IP addresses, rfc822Name (email addresses), and uniformResourceIdentifier (URI) entries. Specifically, during certificate path validation, affected versions of OpenID4VP failed to properly normalize or enforce boundary checks when domain names contained trailing dot (.) characters. Because domain names with a trailing dot signify fully qualified domain names (FQDNs), this omission allowed non-conforming certificates to be improperly validated as compliant with the defined name constraints.

Source Advisory Statement

## Summary `ChainBuilder` (the private RFC 5280 validator behind `TrustEvaluator` and the public credential-parsing API) terminated chain building on **Subject Distinguished Name string equality** rather than on cryptographic closure to a trust anchor. A certificate whose Subject DN string matched a trusted anchor's Subject DN was accepted as the chain terminus **with no signature verification** against the anchor's public key. An attacker who mints a self-signed certificate and copies a trusted anchor's Subject DN string onto it can therefore have that certificate — and any credential signed with its private key — accepted as issued under a trusted authority. ## Impact A relying party using `@openeudi/openid4vp` to verify OpenID4VP presentations (mdoc / SD-JWT VC) could be induced to accept a **forged credential as genuine**, defeating the trust-anchor model. In an eIDAS / EUDI age- or identity-verification deployment this permits impersonation of a trusted issuer. Exploitable through the public verification path: `TrustEvaluator.evaluate()` returns a successful result (and, due to a secondary fallback, attributes the forged leaf to a real anchor's metadata), so downstream callers see a trusted outcome. ## Details `src/trust/ChainBuilder.ts`, `tryBuild()`: ```js while (current.subject !== anchor.subject) { /* verify & climb */ } // loop exits when current.subject === anchor.subject return chain; // returned WITHOUT verifying `current` against the anchor ``` The signature-verified closure path (`if (!issuer)` -> `verifySignature(current, anchor)`) is correct, but the `while` guard provides a second, unverified exit: when a supplied certificate (the leaf, or an attacker-supplied intermediate) has a Subject DN string equal to the anchor's, the loop body never runs, no `verifySignature` call is made, and the chain is returned as valid. The per-certificate checks that do run (validity, algorithm, keyUsage) all operate on the attacker-controlled certificate and do not bind it to the anchor. Secondary contributing weakness (`src/trust/TrustEvaluator.ts`): the anchor selected for the result was matched by `serialNumber` and **fell back to `anchors[0]`** when no match was found, so the forged leaf was reported alongside a genuine anchor's `trustedAuthorityIds` / provenance. ## Proof of Concept ```js // Attacker mints a self-signed cert reusing a trusted anchor's Subject DN. const impostor = selfSigned({ subject: trustedAnchor.subject /* string */ }); // Vulnerable: resolves to a valid chain [impostor] with no signature check. await new ChainBuilder().build(impostor, [trustedAnchor]); ``` ## Patch `ChainBuilder.tryBuild()` now requires the terminating certificate to be **byte-identical to the trust anchor** (DER `rawData` comparison) when the loop exits on DN equality; otherwise it throws `CertificateChainError` with `reason: "signature"`. Cryptographic closure via `verifySignature(current, anchor)` remains the only other accepted termination. As defense-in-depth, `TrustEvaluator` now selects the terminating anchor by DER byte-identity and throws instead of silently falling back to the first candidate. Fixed in `0.8.1`. ## Workarounds None. Upgrade to `0.8.1`. ## Credits Reported by **Reza Shokri** — Quellkern e.U. (https://augenmass.tech), GitHub [@devdotbo](https://github.com/devdotbo). Thanks for the thorough report, the self-contained reproduction, and coordinated disclosure.

CVE-2026-75522 Affected OpenID4VP Versions

1 component(s)
Fixed Versions:
0.8.1
Product / Package Ecosystem Affected Versions Fixed Version
@openeudi/openid4vp
npm
< 0.8.1
0.8.1

References

Frequently Asked Questions

What is CVE-2026-75522?
CVE-2026-75522 is a security vulnerability in OpenID4VP involving X.509 chain validation accepts a forged certificate that reuses a trusted anchor's Subject DN without verifying its signature under CWE-295: Improper Certificate Validation.
Which OpenID4VP versions are affected?
Affected versions include releases prior to 0.8.1 across affected packages: @openeudi/openid4vp.
What version fixes CVE-2026-75522?
Upgrading to 0.8.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @openeudi/openid4vp affected?
Yes, @openeudi/openid4vp is affected in releases prior to 0.8.1. Upgrade your dependency to 0.8.1 or later.
What is the CVSS score of CVE-2026-75522?
CVE-2026-75522 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2026-75522?
CVE-2026-75522 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check npm dependencies for CVE-2026-75522?
Run the dependency tree command: 'npm ls @openeudi/openid4vp'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4c2f-96cf-f5fc",
  "modified" : "2026-11-19T20:35:57Z",
  "published" : "2026-11-19T20:35:57Z",
  "aliases" : [ "CVE-2026-75522" ],
  "summary" : "OpenID4VP: X.509 chain validation accepts a forged certificate that reuses a trusted anchor's Subject DN without verifying its signature",
  "details" : "## Summary\n\n`ChainBuilder` (the private RFC 5280 validator behind `TrustEvaluator` and the public credential-parsing API) terminated chain building on **Subject Distinguished Name string equality** rather than on cryptographic closure to a trust anchor. A certificate whose Subject DN string matched a trusted anchor's Subject DN was accepted as the chain terminus **with no signature verification** against the anchor's public key.\n\nAn attacker who mints a self-signed certificate and copies a trusted anchor's Subject DN string onto it can therefore have that certificate — and any credential signed with its private key — accepted as issued under a trusted authority.\n\n## Impact\n\nA relying party using `@openeudi/openid4vp` to verify OpenID4VP presentations (mdoc / SD-JWT VC) could be induced to accept a **forged credential as genuine**, defeating the trust-anchor model. In an eIDAS / EUDI age- or identity-verification deployment this permits impersonation of a trusted issuer.\n\nExploitable through the public verification path: `TrustEvaluator.evaluate()` returns a successful result (and, due to a secondary fallback, attributes the forged leaf to a real anchor's metadata), so downstream callers see a trusted outcome.\n\n## Details\n\n`src/trust/ChainBuilder.ts`, `tryBuild()`:\n\n```js\nwhile (current.subject !== anchor.subject) { /* verify & climb */ }\n// loop exits when current.subject === anchor.subject\nreturn chain;  // returned WITHOUT verifying `current` against the anchor\n```\n\nThe signature-verified closure path (`if (!issuer)` -> `verifySignature(current, anchor)`) is correct, but the `while` guard provides a second, unverified exit: when a supplied certificate (the leaf, or an attacker-supplied intermediate) has a Subject DN string equal to the anchor's, the loop body never runs, no `verifySignature` call is made, and the chain is returned as valid. The per-certificate checks that do run (validity, algorithm, keyUsage) all operate on the attacker-controlled certificate and do not bind it to the anchor.\n\nSecondary contributing weakness (`src/trust/TrustEvaluator.ts`): the anchor selected for the result was matched by `serialNumber` and **fell back to `anchors[0]`** when no match was found, so the forged leaf was reported alongside a genuine anchor's `trustedAuthorityIds` / provenance.\n\n## Proof of Concept\n\n```js\n// Attacker mints a self-signed cert reusing a trusted anchor's Subject DN.\nconst impostor = selfSigned({ subject: trustedAnchor.subject /* string */ });\n// Vulnerable: resolves to a valid chain [impostor] with no signature check.\nawait new ChainBuilder().build(impostor, [trustedAnchor]);\n```\n\n## Patch\n\n`ChainBuilder.tryBuild()` now requires the terminating certificate to be **byte-identical to the trust anchor** (DER `rawData` comparison) when the loop exits on DN equality; otherwise it throws `CertificateChainError` with `reason: \"signature\"`. Cryptographic closure via `verifySignature(current, anchor)` remains the only other accepted termination. As defense-in-depth, `TrustEvaluator` now selects the terminating anchor by DER byte-identity and throws instead of silently falling back to the first candidate. Fixed in `0.8.1`.\n\n## Workarounds\n\nNone. Upgrade to `0.8.1`.\n\n## Credits\n\nReported by **Reza Shokri** — Quellkern e.U. (https://augenmass.tech), GitHub [@devdotbo](https://github.com/devdotbo). Thanks for the thorough report, the self-contained reproduction, and coordinated disclosure.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@openeudi/openid4vp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.8.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/openeudi/openid4vp/security/advisories/GHSA-4c2f-96cf-f5fc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-75522"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openeudi/openid4vp/pull/25"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openeudi/openid4vp/commit/a3ffd435aadd61aff1f75ec4b2e1a0f44ffabf16"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openeudi/openid4vp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openeudi/openid4vp/releases/tag/v0.8.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295", "CWE-347" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-19T20:35:57Z",
    "nvd_published_at" : "2026-11-18T21:18:02Z"
  }
}