@openeudi/openid4vp 0.11.0 → 0.11.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/dist/index.cjs +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,27 @@ OpenID4VP credential parsing and validation for EUDI Wallets. Supports SD-JWT VC
|
|
|
8
8
|
npm install @openeudi/openid4vp
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Security and maturity
|
|
12
|
+
|
|
13
|
+
This library verifies credentials for identity and age-assurance flows, so its posture is stated here rather than left to be inferred from the feature list.
|
|
14
|
+
|
|
15
|
+
**No independent third-party security audit has been carried out.** The code has not been reviewed by an external security firm.
|
|
16
|
+
|
|
17
|
+
**Two high-severity vulnerabilities have been found and fixed, both reported by outside researchers:**
|
|
18
|
+
|
|
19
|
+
| Advisory | Issue | Fixed in |
|
|
20
|
+
| -------- | ----- | -------- |
|
|
21
|
+
| [GHSA-4c2f-96cf-f5fc](https://github.com/openeudi/openid4vp/security/advisories/GHSA-4c2f-96cf-f5fc) (CVE-2026-75522) | X.509 chain building terminated on Subject DN string equality rather than cryptographic closure, so a forged certificate reusing a trusted anchor's DN was accepted without signature verification | 0.8.1 |
|
|
22
|
+
| [GHSA-h548-cr7v-4v97](https://github.com/openeudi/openid4vp/security/advisories/GHSA-h548-cr7v-4v97) (CVE-2026-77456) | Holder binding was not enforced: an SD-JWT VC's KB-JWT was optional, and mDOC device authentication was never verified, so a captured presentation could be replayed | 0.9.0 |
|
|
23
|
+
|
|
24
|
+
Both are fixed. Both were found externally rather than by this project's own testing — weigh that accordingly when deciding how much to rely on the library, and **always run the latest release**.
|
|
25
|
+
|
|
26
|
+
**Pre-1.0.** While the version is below 1.0, minor bumps may contain breaking changes; see the [migration list](#migration). Full EUDI ARF 1.4+ profile compliance is a 1.0 goal, not a current claim.
|
|
27
|
+
|
|
28
|
+
**What is independently exercised.** The OpenID Foundation conformance suite runs against this library in CI on every pull request, covering the 1.0-Final verifier happy flow for both `sd_jwt_vc` and `iso_mdl` plus the holder-binding negatives. Separately, a downstream deployment built on this library — [eudi-verify](https://github.com/eudi-verify/eudi-verify) 1.4.0 — is [OpenID Certified](https://openid.net/certification/certified-oid4vp-haip-final/) for the `OID4VP-1.0+HAIP-1.0 Verifier iso_mdl direct_post.jwt` profile (14 Aug 2026). That certification is the deployment's, not the library's, but it exercised this code.
|
|
29
|
+
|
|
30
|
+
Known functional gaps that bear on what you can rely on are listed under [Scope and limitations](#scope-and-limitations). To report a vulnerability, use private reporting as described in [SECURITY.md](./SECURITY.md) — please do not open a public issue.
|
|
31
|
+
|
|
11
32
|
## Quick start
|
|
12
33
|
|
|
13
34
|
Parse a Verifiable Presentation token and extract identity claims:
|
package/dist/index.cjs
CHANGED
|
@@ -9701,7 +9701,8 @@ async function verifyPresentation(vpToken, query, options) {
|
|
|
9701
9701
|
const parsed = await parsePresentation(vpToken, options);
|
|
9702
9702
|
const dcqlFormat = INTERNAL_TO_DCQL_FORMAT[parsed.format] ?? parsed.format;
|
|
9703
9703
|
const decodedClaims = parsed.format === "mdoc" && parsed.namespacedClaims !== void 0 ? parsed.namespacedClaims : parsed.claims;
|
|
9704
|
-
const
|
|
9704
|
+
const sameFormat = query.credentials.filter((c) => c.format === dcqlFormat);
|
|
9705
|
+
const presentedCredentialQuery = sameFormat.find((c) => matchesCredentialType(c, parsed)) ?? sameFormat[0] ?? query.credentials[0];
|
|
9705
9706
|
const decoded = {
|
|
9706
9707
|
id: presentedCredentialQuery?.id ?? "presented",
|
|
9707
9708
|
format: dcqlFormat,
|
|
@@ -9725,6 +9726,17 @@ async function verifyPresentation(vpToken, query, options) {
|
|
|
9725
9726
|
valid: parsed.valid && match.satisfied
|
|
9726
9727
|
};
|
|
9727
9728
|
}
|
|
9729
|
+
function matchesCredentialType(credentialQuery, parsed) {
|
|
9730
|
+
if (parsed.format === "sd-jwt-vc") {
|
|
9731
|
+
const vctValues = credentialQuery.meta?.vct_values;
|
|
9732
|
+
return typeof parsed.vct === "string" && Array.isArray(vctValues) && vctValues.includes(parsed.vct);
|
|
9733
|
+
}
|
|
9734
|
+
if (parsed.format === "mdoc") {
|
|
9735
|
+
const doctype = credentialQuery.meta?.doctype_value;
|
|
9736
|
+
return typeof parsed.docType === "string" && doctype === parsed.docType;
|
|
9737
|
+
}
|
|
9738
|
+
return false;
|
|
9739
|
+
}
|
|
9728
9740
|
function isEncryptedResponse(x) {
|
|
9729
9741
|
return typeof x === "object" && x !== null && "response" in x && typeof x.response === "string" && Object.keys(x).length === 1;
|
|
9730
9742
|
}
|
|
@@ -10462,7 +10474,7 @@ function equalBytes(a, b) {
|
|
|
10462
10474
|
|
|
10463
10475
|
// src/index.ts
|
|
10464
10476
|
init_errors();
|
|
10465
|
-
var VERSION = "0.11.0";
|
|
10477
|
+
var VERSION = "0.11.1-rc.0";
|
|
10466
10478
|
/*! Bundled license information:
|
|
10467
10479
|
|
|
10468
10480
|
pvtsutils/build/index.es.js:
|