• Authentication

JWT Misconfiguration

JWT misconfiguration covers broken token validation — alg=none, weak secrets, missing exp checks, or accepting tokens signed with the wrong key — that lets attackers forge identity.

How attackers abuse it

Libraries that honor the header’s alg field may accept unsigned tokens (none) or HMAC verification with a public RSA key confused as a secret. Attackers forge admin claims in the payload.

Long-lived tokens without revocation, accepting tokens from other audiences (aud), or skipping issuer checks enable replay across environments.

Secrets committed to repos or default “change-me” HMAC keys make brute-force or direct forgery trivial.

What proof looks like

Proof is a forged or mutated JWT accepted by the API for a privileged action under test — for example alg confusion or stripped signature — with before/after token headers shown (secrets redacted).

In PandaONE, this class maps to the Authentication finding category. Alerts ship only with evidence — never as unverified scanner noise.

How to prevent it

  • Pin allowed algorithms server-side; reject alg=none and unexpected algs.
  • Validate exp, nbf, iss, aud, and signature with the correct key material.
  • Use strong asymmetric keys in production; rotate and store secrets in a vault.
  • Keep access tokens short-lived; use refresh rotation and server-side revocation where needed.
  • Never embed secrets in mobile/JS clients; treat JWTs as bearer credentials.

• FAQ

Frequently asked questions

← All vulnerability classes

Hunt this class with proof

Or scan your domain.

Featured on ScrollLaunchFeatured on CodeHype