GHSA-3V3J-FGHH-R2GG
SD-JWT VC Key Binding JWT audience is not bound to the verifier unless the optional audience option is passed
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-3V3J-FGHH-R2GG divulgada · CVSS 5.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
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.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npm@openeudi/openid4vp |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/openeudi/openid4vp/security/advisories/GHSA-3v3j-fghh-r2ggLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
