Skip to content
IAM Insights

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.

Auth0 Blog · Kunal Dawar · February 27, 2026 · read

share
2,578 words. With Kunal Dawar, author, Auth0 (Okta).
01

What's happening

Finding2
BI-FIND-2026-1088Lead finding

In 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.

high confidencebest source: vendor, technicalobserved Feb 2026EvidenceDPoP validation and modes
flag a problem with BI-FIND-2026-1088
Figure steps
  1. The client sends a request with its access token and a DPoP proof signed by its private key.
  2. A copy of the token and the proof is kept somewhere along the way, such as a log or a proxy.
  3. Within 300 seconds, the same request goes to the same method and URL again.
  4. Signature, method, URL, token hash, key thumbprint and proof age all pass, so the API accepts it.
  5. No step asks whether this proof's jti was used before; v3.0.0 has no such check.
Fig. 1

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 →

BI-FIND-2026-1089

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.

high confidencebest source: vendor, technicalobserved Feb 2026EvidenceDPoP validation and modesWhy v2 fell short
flag a problem with BI-FIND-2026-1089
02

Section by section

4

showing 4 of 4

[1]

Why v2 fell short

Kunal Dawar, Auth0 (Okta)

Standards

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 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

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

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

Terms used

Access token
An OAuth 2.0 credential, usually an opaque string, representing a specific scope and lifetime of access that the resource server enforces when a client presents it.
DPoP
A way to bind an OAuth access token to the specific key that requested it: the client signs a fresh proof for every call, so a stolen bearer token is useless to whoever steals it without also holding the matching private key.
HTTP
Hypertext Transfer Protocol: the request-and-response protocol of the web, in which a client sends a method such as GET or POST to a URL and receives a status code and body.
Replay attack
Capturing a valid message or token and sending it again to repeat an action or impersonate its sender.
Bearer token
A token that works for whoever holds it, so a stolen copy can be replayed until it expires.
Application programming interface
Application programming interface: a defined way for software components to request operations or exchange data.
RFC 6750 (OAuth 2.0 Bearer Token Usage)
Defines how bearer tokens are sent in HTTP requests and how resource servers signal errors with WWW-Authenticate.
Confirmation (cnf) claim
A field in a token naming the key whose holder may use it; chaining one token's cnf key to the signer of the next is how delegation chains are built.

Read next

Was this briefing useful?

Share this briefing

Every finding, forecast and open question on this site has a permanent ID. If we reword one, its ID stays the same, so a citation keeps pointing to the same claim.

Follow us on LinkedInRSS feed

Working on an identity problem this research touches? Talk to Boston Identity