A JWT is decoded with a jsonwebtoken Validation that never sets the expected issuer.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
Because the issuer is not pinned, decode accepts a token minted by ANY issuer: the jsonwebtoken crate does not validate the iss claim unless you opt in, so a token signed by an attacker-controlled or otherwise untrusted issuer passes validation as long as the signature checks out. For OAuth/OIDC this lets a token from the wrong authorization server be replayed against this API.
Pin the issuer before decoding, e.g. validation.set_issuer(&["https://issuer.example.com"]) (or set validation.iss), so only tokens whose iss claim matches your trusted authorization server are accepted.
Suppressing this rule
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.
// oauthlint-disable-next-line auth.rust.jwt.no-issuer-validation -- <reason>