CVE-2024-34394 libxmljs2 namespaces type confusion RCE

High 8.1 Published Updated

A type confusion vulnerability in libxmljs2 allows attackers to achieve remote code execution or denial of service via crafted XML input.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2024-34394?

CVE-2024-34394 is a high-severity memory corruption vulnerability in libxmljs2, published on 2 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-843

Which versions are affected by CVE-2024-34394?

2 open source packages ship an affected version, including libxmljs2.

PackageAffectedFixed in
libxmljs2 npmAll versions to 0.35.0None
libxmljs2 npmAll versions to 0.35.0None

How do I fix CVE-2024-34394?

No fix has been published for CVE-2024-34394 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2024-34394 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-34394 exists.

Sources

Also known as GHSA-78h3-pg4x-j8cv.

Is CVE-2024-34394 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free