Out-of-bounds Read Vulnerability in njwt

njwt Updated 02 Oct 2025

Summary

01/09/2020
LOW
Yes i
Low
Not published

GHSA-g3qw-9pgp-xpj4: Out-of-bounds Read in njwt. Affects njwt versions < 1.0.0. Fixed in 1.0.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

njwt is an npm package that provides JSON Web Token (JWT) functionality. It allows users to encode, decode, and manipulate JWTs. The package is widely used in Node.js applications for implementing authentication and authorization mechanisms. However, versions prior to 1.0.0 are vulnerable to an out-of-bounds read issue when a number is passed into the base64urlEncode function.

Vulnerability Detail

The out-of-bounds read vulnerability in njwt arises due to improper handling of input data. When a number is provided as input to the base64urlEncode function, it can lead to out-of-bounds memory access. On Node.js 6.x or lower, this can result in the exposure of sensitive information. On any other version of Node.js, it can cause a Denial of Service (DoS) vulnerability.

How To Fix

Minimum fixed version

1.0.0

This is the first release that contains the fix.

npm install njwt@1.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

The out-of-bounds read vulnerability in njwt can lead to the exposure of sensitive information or cause a Denial of Service (DoS) vulnerability. It is crucial to upgrade to version 1.0.0 of the njwt package to mitigate this issue. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for njwt →

Share this vulnerability

FAQ

njwt is an npm package that provides JSON Web Token (JWT) functionality. It allows users to encode, decode, and manipulate JWTs.

An out-of-bounds read vulnerability occurs when a program accesses memory outside the bounds of a defined buffer. In this case, it can lead to the exposure of sensitive information or cause a Denial of Service (DoS) vulnerability.

On Node.js 6.x or lower, this vulnerability can expose sensitive information. On any other version of Node.js, it creates a Denial of Service (DoS) vulnerability.

You can check the version of njwt installed in your project by running the following command in your project directory:

npm list njwt

No, there is no known workaround for this vulnerability. It is recommended to upgrade to version 1.0.0 of the njwt package.

Related vulnerabilities

Recent vulnerabilities recorded for njwt.

How To Fix

Minimum fixed version

1.0.0

This is the first release that contains the fix.

npm install njwt@1.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback