Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

JWT payload size > 475 bytes

Open
#956 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
security

Research direction

Start at the jwt.sign entry point and build a minimal reproduction using the reported RS256 configuration, comparing payloads of 475 and 476 bytes. Check whether the resulting token is actually malformed and whether the behavior is imposed by the library; done means a confirmed cause with a regression test or a clearly documented limitation.

Written by the indexing model from the issue text.

Description

Hi,

I'm trying to produce the token by passing the JSON string. It works correctly if the payload (the length of the string) is less than 476 bytes. A string with a length of 475 bytes works, but a string of 476 bytes produces a corrupted token. Is there any limitation on the size? Am I doing something wrong?

 jwt.sign(info, privateKey, { algorithm: 'RS256' }, (err, token) => {
...

Thanks,

Alex

Dominant language
JavaScript
Stars
18.2k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

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.

More from auth0/node-jsonwebtoken

All issues in auth0/node-jsonwebtoken

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.