Malicious Code Vulnerability in libxmljs12 Package
Summary
MAL-2026-1772: Malicious code in libxmljs12 (npm). Affects libxmljs12 versions 0.30.1. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
libxmljs12 is a popular Node.js library that provides bindings for the libxml2 library, enabling developers to parse and manipulate XML documents efficiently. It is widely used in various applications due to its performance and ease of use. However, recent findings have revealed a serious vulnerability that exposes users to potential malicious code execution.
Vulnerability Detail
The vulnerability identified in libxmljs12 is characterized by the presence of malicious code that can compromise the integrity of applications utilizing this package. This issue originated from a specific version (0.30.1) that was identified as containing harmful code. If exploited, this vulnerability could allow attackers to execute arbitrary code, leading to data breaches, unauthorized access, or system compromise. The malicious code was sourced from a repository that has been flagged for distributing compromised packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall libxmljs12
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
As a temporary workaround, you can remove the libxmljs12 package from your project until a secure version is confirmed. Use the following command to uninstall the package: npm uninstall libxmljs12. Additionally, consider using alternative libraries for XML parsing that do not have known vulnerabilities.
Conclusion
The discovery of malicious code in the libxmljs12 package poses a significant risk to applications that rely on it. Users are strongly advised to update to the latest version or consider alternative solutions to safeguard their systems. Regular monitoring for vulnerabilities using tools like Vulert can help maintain application security.
See every vulnerability recorded for libxmljs12 →
FAQ
libxmljs12 is a Node.js library that provides bindings for the libxml2 library, allowing developers to work with XML documents.
The malicious code was introduced in version 0.30.1 of the libxmljs12 package, which has been flagged for containing harmful content.
Exploiting this vulnerability could lead to arbitrary code execution, data breaches, and unauthorized access to systems.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
If immediate updates are not possible, consider removing the package or using alternative libraries until a secure version is available.