RealDevSquad / RealDevSquad/website-backend

JWT decode without verify.

Open
#625 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

security
Dominant language
JavaScript
Stars
74
Forks
276
Avg merge
1d 26m
Merged PRs (30d)
14

Description

Rule triggered: https://semgrep.dev/r?q=javascript.jsonwebtoken.security.audit.jwt-decode-without-verify.jwt-decode-without-verify

Code Link: https://github.com/lucky-org/website-backend/blob/c71fccf73e40927a1a8bd700949469c99ec7a5e7/services/authService.js#L32

Detected the decoding of a JWT token without a verify step. JWT tokens must be verified before use, otherwise the token's integrity is unknown.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with services/authService.js at line 32, using the linked code location as the entry point. Trace how the JWT is decoded and where its integrity can be checked before use; done means the token is verified before any decoded data is trusted, with relevant project checks passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
authentication, backend, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.