Briefing · Article · source · updated · Boston Identity
Auth0's Go JWT middleware v3 adds DPoP but accepts a reused proof for five minutes, and bearer tokens by default
Kunal Dawar, an engineer on Auth0's SDK team, explains why Auth0 rewrote go-jwt-middleware, its open-source Go library for checking access tokens. The main security addition is DPoP, the standard that ties a token to a key the client holds. The post says the library checks a proof's age to stop replay. Version 3.0.0 accepts a proof for five minutes after it is made and keeps no record of the proofs it has already seen.
What's happening
Finding2In the v3.0.0 code, go-jwt-middleware accepts a DPoP proof for 300 seconds by default and keeps no record of proof ids it has already seen.
Dawar writes that go-jwt-middleware v3 checks a DPoP proof's signature, its HTTP method and URL, the access-token hash and the key thumbprint, and that it "checks the proof's age to prevent replay attacks." In the v3.0.0 code we checked, that age check is the whole replay defence: by default a proof is accepted for 300 seconds after it was made, and the library keeps no record of proof ids (jti) it has already seen, although the repository's migration guide lists "Replay protection via jti and iat claims". RFC 9449 requires the time limit and leaves a single-use check to the server's choice. We read this to mean that anyone who copies a token and its proof from a log or a proxy can send the same request to the same method and URL within those five minutes, and it passes every check the post lists.
flag a problem with BI-FIND-2026-1088
Figure steps
- The client sends a request with its access token and a DPoP proof signed by its private key.
- A copy of the token and the proof is kept somewhere along the way, such as a log or a proxy.
- Within 300 seconds, the same request goes to the same method and URL again.
- Signature, method, URL, token hash, key thumbprint and proof age all pass, so the API accepts it.
- No step asks whether this proof's jti was used before; v3.0.0 has no such check.
A token and proof copied from a log pass every check the post lists if they are resent to the same URL within five minutes.
Drawn from the post's list of checks and the library's v3.0.0 codeSource dated February 27, 2026Passage: DPoP validation and modes
Swipe for the full figure →
By default v3 runs DPoP in permissive mode, accepting plain bearer tokens alongside DPoP ones until an API's owners switch to DPoPRequired.
v3 ships with DPoP in its permissive mode. DPoPAllowed, the default, accepts plain bearer tokens alongside DPoP ones, while DPoPRequired, which rejects bearer tokens outright, is what Dawar calls "the ultimate end goal for maximum API security." In his section on what v2 lacked, he describes the risk DPoP answers: "if someone steals the token, they effectively become you." An API that moves to v3 and leaves that setting alone still accepts a plain bearer token from whoever holds it, until its owners switch modes.
flag a problem with BI-FIND-2026-1089
Section by section
4showing 4 of 4
[1]Why v2 fell short
Kunal Dawar, Auth0 (Okta)
Standards
Why v2 fell short
Kunal Dawar, Auth0 (Okta)
Dawar lists what was wrong with v2: type assertions that could panic, a validator that took four unlabelled positional parameters, no support for DPoP (RFC 9449), and middleware tied to net/http. He describes the flaws without citing an incident any of them caused.
opinionfrom published text
[2]v3 developer experience and architecture
Kunal Dawar, Auth0 (Okta)
Standards
v3 developer experience and architecture
Kunal Dawar, Auth0 (Okta)
v3 swaps the positional validator for functional options and hands back claims through a generic GetClaims. Validation moves into a core package with no net/http dependency, lestrrat-go/jwx v3 replaces square/go-jose, errors follow RFC 6750, logging goes through slog, and WithIssuers accepts several issuers. The post claims faster parsing and lower memory use but shows no benchmark.
announcementfrom published text
[3]DPoP validation and modes
Kunal Dawar, Auth0 (Okta)
Standards
DPoP validation and modes
Kunal Dawar, Auth0 (Okta)
With DPoP on, v3 checks the proof's signature, its HTTP method and URL, the access-token hash, the key thumbprint in the token's cnf claim and the proof's age. Three modes set how strict it is (DPoPAllowed, the default, then DPoPRequired and DPoPDisabled), and helpers handle URL checks behind a proxy. The post never mentions tracking proof ids (jti).
announcementfrom published text
[4]Migration and Multiple Custom Domains roadmap
Kunal Dawar, Auth0 (Okta)
CIAM
Migration and Multiple Custom Domains roadmap
Kunal Dawar, Auth0 (Okta)
Dawar calls the move to v3 mechanical, since every breaking change shows up as a compiler error, and says v2 and v3 can run side by side; v3 needs Go 1.24 or later. Multiple Custom Domains support was still being built when he wrote, promising issuers resolved at request time, RS256 and HS256 issuers in one validator, and per-issuer stats.
roadmap hintfrom published text