Malicious Code Vulnerability in libxmljs8: A Critical Threat

libxmljs8 Updated 19 Mar 2026

Summary

18/03/2026
CRITICAL
No i
Critical
Not published

MAL-2026-1785: Malicious code in libxmljs8 (npm). Affects libxmljs8 versions 0.30.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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libxmljs8 is a popular npm package that provides a JavaScript binding for the libxml2 library, enabling developers to parse and manipulate XML documents easily. It is widely used in various applications for its efficiency and functionality. However, recent findings have revealed that this package is susceptible to malicious code injection, posing significant risks to applications that rely on it.

Vulnerability Detail

The vulnerability identified in libxmljs8 stems from the presence of malicious code within version 0.30.1 of the package. This malicious code can potentially allow attackers to execute arbitrary commands, leading to unauthorized access, data breaches, or system compromise. The origin of this vulnerability is linked to the package's distribution through npm, where it was found to contain harmful scripts that could exploit users' systems. The ramifications of this vulnerability are severe, as it can affect any application utilizing this compromised version of the package.

How To Fix

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

npm uninstall libxmljs8

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 affected version of libxmljs8 from your project and avoid using it until a secure version is confirmed. You can do this by executing the command: 'npm uninstall libxmljs8'. Additionally, consider using alternative libraries that provide similar functionality without the associated risks.

Conclusion

The discovery of malicious code in libxmljs8 highlights the importance of maintaining secure dependencies in software development. By promptly updating to the latest version and utilizing tools like Vulert for monitoring, developers can protect their applications from potential threats.

See every vulnerability recorded for libxmljs8 →

Share this vulnerability

FAQ

The vulnerability involves malicious code that can execute arbitrary commands, posing a risk of unauthorized access and data breaches.

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.

Update the libxmljs8 package to the latest version using 'npm install libxmljs8@latest' to mitigate the vulnerability.

Yes, consider using other XML parsing libraries that do not have known vulnerabilities, such as xml2js or fast-xml-parser.

As a temporary measure, uninstall the affected version using 'npm uninstall libxmljs8' and monitor for updates.

How To Fix

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

npm uninstall libxmljs8

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