Fix guide · info · jwt_expired_in_client
Expired JWT hardcoded in client bundle
A JWT in your client bundle has an exp claim in the past. The token is currently useless to attackers, but its presence indicates a hardcoded fixture that survived the build — usually a test artefact that points at a live token elsewhere.
Why it matters
Expired tokens aren't a direct vulnerability — your backend should reject them. The reason this is flagged at all is that the surrounding pattern usually contains a live token too. Dev environments often have a TEST_USER_TOKEN, a STAGING_ADMIN_TOKEN, and a LIVE_FALLBACK_TOKEN constant block; if one is in the bundle, the others probably are too.
Treat this as a cleanup signal, not an emergency.
How to fix it
- Find the surrounding constant.
grep -B5 -A5 "<first-12-chars>" src/will surface the file and show what other tokens are nearby.
- If any of those other tokens are still valid (decode and check
exp), treat the live one as exposed — seejwt_admin_in_clientorjwt_no_expirationdepending on its claims.
- Move the test fixtures out of
src/intotest/fixtures/orscripts/, and verify your bundler isn't pulling files from those directories into the production build (viteandwebpackshould both exclude them by default; check your config if you've customised it).
Full guide: /blog/jwt-mistakes-vibe-coded.
Did vibecheck flag this on your app?
If you reached this page from a vibecheck inspection report, the redacted match in your scan output is the exact string we found in your bundle. After applying the fix above, run the inspection again — the finding should clear.
Run another inspection