Critical Vulnerability in node-xml2js: External Manipulation of Object Properties

node-xml2js Updated 02 Oct 2025

Summary

05/04/2023
N/A
No i
Medium
5.3

UBUNTU-CVE-2023-0842: xml2js version 0.4.23 allows an external attacker to edit or add new properties to an object. Affects node-xml2js versions 0.2.8-1. No fix is published. 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-xml2js is a popular JavaScript library used for converting XML to JavaScript objects and vice versa. It is widely utilized in applications that require XML parsing and manipulation. The library's ease of use and integration makes it a go-to choice for developers. However, it has been found to have a significant vulnerability that allows external attackers to manipulate object properties, potentially leading to unauthorized access or data corruption.

Vulnerability Detail

The vulnerability identified as CVE-2023-0842 in node-xml2js arises from improper validation of incoming JSON keys. This flaw allows an external attacker to edit or add new properties to an object by manipulating the proto property. The ramifications of this vulnerability can be severe, as it may enable attackers to alter the behavior of the application, leading to data integrity issues or unauthorized access to sensitive information.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, developers can implement input validation to sanitize incoming JSON keys before processing them. This can help mitigate the risk of exploitation until the package is updated. For example, you can check for unwanted properties in the incoming JSON and remove them before further processing.

Conclusion

The vulnerability CVE-2023-0842 in node-xml2js poses a significant risk due to its potential to allow external manipulation of object properties. It is crucial for developers to update to the patched version of the package and implement necessary workarounds to safeguard their applications.

See every vulnerability recorded for node-xml2js →

Share this vulnerability

FAQ

CVE-2023-0842 is a vulnerability in the node-xml2js package that allows external attackers to manipulate object properties due to improper validation of JSON keys.

This vulnerability can lead to unauthorized changes in object properties, potentially compromising data integrity and application behavior.

Versions prior to 0.4.23 are affected by this vulnerability. It is recommended to upgrade to the latest version.

You can use Vulert, which monitors open-source vulnerabilities in real-time. By using the manifest file like package-lock.json, you can check for vulnerabilities without any installation. Visit the Vulert playground at Vulert Scanner.

If immediate updates are not possible, implement input validation to sanitize JSON keys as a temporary workaround until you can upgrade.

Related vulnerabilities

Recent vulnerabilities recorded for node-xml2js.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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