Malicious Code Vulnerability in libxmljs12 Package

libxmljs12 Updated 19 Mar 2026

Summary

18/03/2026
CRITICAL
No i
Critical
Not published

MAL-2026-1772: Malicious code in libxmljs12 (npm). Affects libxmljs12 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 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

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 →

Share this vulnerability

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.

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 →

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