# GHSA-3V3J-FGHH-R2GG: SD-JWT VC Key Binding JWT audience is not bound to the verifier unless the optional audience option is passed

- Database: GitHub
- Severity: CVSS 5.3 (Medium)
- Published: 2026-10-21
- Modified: 2026-10-21

## Affected versions

- @openeudi/openid4vp (npm): through 0.13.0

## Description

### Impact

When verifying an SD-JWT VC presentation, `@openeudi/openid4vp` checks the Key Binding JWT (KB-JWT) `aud` claim **only if the caller passes the optional `audience` option**. `verifyAuthorizationResponse` accepts `clientId`, but before this fix it used `clientId` only to build the mdoc SessionTranscript, never as the KB-JWT audience. The README examples do not set `audience`.

When `audience` is not set, the library accepts:
- a KB-JWT with no `aud`;
- a KB-JWT whose `aud` names a different verifier.

This allows a presentation relay (cross-verifier replay):
1. A malicious verifier M obtains an honest verifier V's `nonce`.
2. M sends that nonce in its own request. The wallet shows "M" to the user, and the user consents.
3. M forwards the resulting presentation to V. V accepts it, so M impersonates the holder at V.

This violates:
- OpenID4VP 1.0 B.3.6: the `aud` claim MUST be the Client Identifier;
- OpenID4VP 1.0 §14.1.2;
- RFC 9901 §7.3 step 5f.

**Not affected:** integrations that already pass `audience` equal to their client identifier.

### Patches

Fixed in **0.14.0**:
- `verifyAuthorizationResponse` uses `options.clientId` as the audience when `audience` is not set.
- Verifying a KB-JWT with no audience available throws the new `MissingAudienceError`.
- When an audience is configured, a KB-JWT with a missing `aud` is invalid.
- `aud` must be a single string equal to the audience.

0.14.0 also enforces the KB-JWT `typ` (`kb+jwt`) and an `iat` freshness window (`kbJwtMaxAge`, default 300 s).

### Workarounds

Always pass `audience` set to your verifier's `client_id` (including its prefix, for example `x509_hash:...`) to `verifyAuthorizationResponse`, `verifyPresentation` or the parser options.

### References
- OpenID4VP 1.0, Appendix B.3.6 and §14.1.2: https://openid.net/specs/openid-4-verifiable-presentations-1_0.html
- RFC 9901 §4.3 and §7.3: https://www.rfc-editor.org/rfc/rfc9901.html
- Found during an internal specification-conformance audit, 2026-10-20.

## References

- https://github.com/openeudi/openid4vp/security/advisories/GHSA-3v3j-fghh-r2gg

Page: https://cve.now/GHSA-3V3J-FGHH-R2GG

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
