Skip to content
vetkitChecksChangelogDocumentation

vetkit.js.jwt.decode-trusted

The authenticated user is taken from jwt.decode(), which does not verify the token signature. Anyone can craft a token with arbitrary claims and impersonate any user.

Last updated:

Suite: Security

javascript, typescript

The authenticated user is taken from jwt.decode(), which does not verify the token signature. Anyone can craft a token with arbitrary claims and impersonate any user.

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Use jwt.verify(token, key, { algorithms: [...] }) (or jose jwtVerify) and only trust its result.

References

Source: packages/engine/rules/sast/javascript.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.