Out-of-bounds Read in njwtGHSA-g3qw-9pgp-xpj4
GHSA-g3qw-9pgp-xpj4 is a security vulnerability in njwt. A fix is available for njwt — see the affected versions and patch details below.
Real-World Exposure
njwtReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
Versions of njwt prior to 1.0.0 are vulnerable to out-of-bounds reads when a number is passed into the base64urlEncode function.
On Node.js 6.x or lower this can expose sensitive information and on any other version of Node.js this creates a Denial of Service vulnerability.
Recommendation
Upgrade to version 1.0.0.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | njwt | all versions | 1.0.0npm install njwt@1.0.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for njwt, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update njwt to 1.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-g3qw-9pgp-xpj4 is resolved across your whole dependency graph.
Workarounds
Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.
Frequently Asked Questions
Is GHSA-g3qw-9pgp-xpj4 in your dependencies?
Find it across npm, including transitive dependencies.