Critical Malicious Code Vulnerability in 1libxmljs2 Package
Summary
MAL-2025-190556: Malicious code in 1libxmljs2 (npm). Affected versions are not published. 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
1libxmljs2 is an npm package used for XML parsing and manipulation in JavaScript applications. It provides developers with tools to work with XML data structures efficiently. However, this package has been identified as containing malicious code, posing significant security risks to systems that utilize it.
Vulnerability Detail
The vulnerability stems from the presence of embedded malicious code within the 1libxmljs2 package. This code can compromise any computer that has the package installed, potentially allowing unauthorized access to sensitive information such as secrets and keys. The malicious nature of the code means that simply removing the package may not eliminate all traces of the compromise, as full control of the affected system may have been granted to an external entity.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall 1libxmljs2
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 workaround, if you need to continue working with XML in your application, consider using alternative packages that are known to be secure, such as 'xml2js' or 'fast-xml-parser'. You can install them using npm with the following commands: 'npm install xml2js' or 'npm install fast-xml-parser'.
Conclusion
The 1libxmljs2 package has been identified as containing malicious code, posing serious security risks to systems that utilize it. Immediate action is required to remove the package and secure any sensitive information. Alternative packages should be considered for XML processing.
See every vulnerability recorded for 1libxmljs2 →
FAQ
The main risk is that any system with the package installed may be fully compromised, allowing attackers to access sensitive information.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
You should uninstall the package immediately and rotate any secrets or keys stored on the affected system.
Yes, consider using 'xml2js' or 'fast-xml-parser' as secure alternatives for XML parsing.
Currently, there is no patched version available for the 1libxmljs2 package.