Vulnerability in node-json5 - Prototype Injection

node-json5 Updated 02 Oct 2025

Summary

25/11/2023
N/A
Yes i
Unrated
Not published

DLA-3665-1: node-json5 - security update. Affects node-json5 versions < 0.5.1-1+deb10u1. Fixed in 0.5.1-1+deb10u1. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

node-json5 is a pure JavaScript implementation of the JSON5 standard. It provides additional functionality and flexibility compared to the standard JSON format. However, a vulnerability has been discovered in node-json5 that allows for prototype injection during parsing.

Vulnerability Detail

The vulnerability in node-json5 arises from a lack of proper input validation during parsing. An attacker can exploit this by injecting malicious prototype properties into the parsed JSON5 object. This can lead to various security issues, including remote code execution, information disclosure, and denial of service attacks.

How To Fix

Minimum fixed version

0.5.1-1+deb10u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-json5

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

Workaround

There is no known workaround for this vulnerability. It is essential to update the node-json5 package to the fixed version.

Conclusion

The vulnerability in node-json5 allows for prototype injection during parsing, which can lead to severe security issues. It is crucial to upgrade to the fixed version of the package (0.5.1-1+deb10u1 or later) to mitigate this vulnerability. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for node-json5 →

Share this vulnerability

FAQ

node-json5 is a JavaScript library that provides a pure JavaScript implementation of the JSON5 standard. It allows for more flexible and human-readable JSON-like data structures.

Prototype injection is a technique where an attacker can modify the prototype of an object to add or modify properties and methods. This can lead to unexpected behavior and security vulnerabilities.

The consequences of this vulnerability can vary depending on the specific usage of node-json5 in an application. However, possible outcomes include remote code execution, information disclosure, and denial of service attacks.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will analyze it for any open-source vulnerabilities, including this one.

You can find more information about this vulnerability, including its security tracker page and Debian LTS security advisories, at https://security-tracker.debian.org/tracker/node-json5

Related vulnerabilities

Recent vulnerabilities recorded for node-json5.

How To Fix

Minimum fixed version

0.5.1-1+deb10u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-json5

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