Malicious Code Vulnerability in libxmljs2var Package

libxmljs2var Updated 19 Mar 2026

Summary

18/03/2026
CRITICAL
No i
Critical
Not published

MAL-2026-1782: Malicious code in libxmljs2var (npm). Affects libxmljs2var versions 0.30.2. 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 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

libxmljs2var is a JavaScript library designed for parsing and manipulating XML documents in Node.js applications. It provides a simple API for developers to work with XML data, making it easier to integrate XML processing into their applications. However, the package has been found to contain malicious code, posing a significant security risk to users who rely on it.

Vulnerability Detail

The vulnerability in libxmljs2var stems from the inclusion of malicious code that can compromise the security of applications using this package. This code may allow unauthorized access to sensitive data, execute arbitrary commands, or lead to further exploitation of the system. The malicious nature of the code was identified through analysis by security researchers, highlighting the importance of scrutinizing third-party packages.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall libxmljs2var

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

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

Workaround

If you cannot update the package immediately, consider removing libxmljs2var from your project and replacing it with a more secure alternative for XML processing. Additionally, review your application's dependencies to ensure no other vulnerable packages are present.

Conclusion

The discovery of malicious code in the libxmljs2var package poses a serious threat to applications utilizing this library. It is crucial for developers to update to a secure version and consider alternatives if necessary. Regular monitoring of dependencies using tools like Vulert can help maintain application security.

See every vulnerability recorded for libxmljs2var →

Share this vulnerability

FAQ

libxmljs2var is a Node.js library for parsing and manipulating XML documents, providing a straightforward API for developers.

The malicious code was identified by security researchers from ReversingLabs during a routine analysis of npm packages.

Using the compromised version of libxmljs2var can lead to unauthorized access to sensitive data, execution of arbitrary commands, and potential system exploitation.

You can use Vulert, which monitors open-source vulnerabilities in your software. By analyzing your package-lock.json file, Vulert can alert you to any vulnerabilities, including this one. You can also check your application using the Vulert playground without signup.

If immediate updates are not possible, consider removing the libxmljs2var package and using a secure alternative for XML processing until you can address the vulnerability.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall libxmljs2var

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

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