-
Notifications
You must be signed in to change notification settings - Fork 2
Description
The title of this document is JSON Web Token Best Current Practices. Its goal is "to provide actionable guidance leading to secure implementation and deployment of JWTs" and "to facilitate secure implementation and deployment of JWTs" (Introduction).
Section 2 (Threats and Vulnerabilities) lists some known and possible problems with JWT implementations and deployments.
Section 2.7 (Substitution Attacks) states:
There are attacks in which one recipient will be given a JWT that was intended for it and will attempt to use it at a different recipient for which that JWT was not intended.
This relates to the audience of the JWT.
Section 2.8 (Cross-JWT Confusion) states:
As JWTs are being used by more different protocols in diverse application areas, it becomes increasingly important to prevent cases of JWT tokens that have been issued for one purpose being subverted and used for another.
The concept of "purpose" is inexistent in JWT-SD and would need to be clarified.
This draft is concentrating on the structure of JWTs, but is ignoring the context in which JWTs are requested, obtained and then used.
SD-JWTs defined SD-JWTs formats for two flows:
a) when an issuer issues a SD-JWT including all Disclosures,
b) when a verifier presents SD-JWT or SD-JWT+KB including selected Disclosures.
However, SD-JWT does not define which protocols can be used to carry these data formats.
Hence, threats and vulnerabilities that can arise in these protocols are not considered, nor addressed.
This means that the current content of this draft while explicit targeted to "Developers of specifications that rely on JWTs,
both inside and outside the IETF" is incomplete.
Two important "specifications that rely on JWTs outside the IETF" are:
"OID4VCI": OpenID for Verifiable Credential Issuance - draft 16
https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html"OID4VP": "OpenID for Verifiable Presentations 1.0" which defines a protocol for requesting and presenting Credentials (published on 9 July 2025). It defines a mechanism on top of OAuth 2.0 to allow presentation of claims in the form of Verifiable Credentials as part of the protocol flow. https://openid.net/specs/openid-4-verifiable-presentations-1_0.html
These two OpenID specifications contain many optional features. This makes difficult for implementers to select a right combination that allows to develop a secure implementation.
When using selective disclosure of claims, it is important to prevent cases where JWTs issued for one individual would be usable by another individual with a complicity between these individuals. In some cases, this issue is identified as a "relay attack".
This issue has not been identified in the documents produced by the OAuth WG (nor the SPICE WG), nor in OID4VP.
OID4VP defines protocols for requesting and presenting Credentials. It is not explicitly said that these protocols must be supported by a single application and that the end-user using the device supporting that application SHALL NOT be able to modify it or to use its "key store" by downloading a rogue application and then using these keys with it.
Once this issue is identified, it needs to be addressed in a section called "implementation considerations" which, unfortunately, is inexistent in the proposed draft.
This topic is highly dependent upon the type of the device, however, general considerations apply.