CVE-2024-31573 XMLUnit for Java has Insecure Defaults when Processing XSLT Stylesheets

Medium 4.0 Published Updated

Attackers can execute arbitrary code via untrusted XSLT stylesheets in XMLUnit for Java due to enabled extension functions.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-31573?

CVE-2024-31573 is a medium-severity code injection vulnerability in XMLUnit for Java, published on 17 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

XMLUnit for Java before 2.10.0, in the default configuration, might allow code execution via an untrusted stylesheet (used for an XSLT transformation), because XSLT extension functions are enabled.

Weakness: CWE-669

Which versions are affected by CVE-2024-31573?

2 open source packages ship an affected version, including org.xmlunit:xmlunit-core.

PackageAffectedFixed in
org.xmlunit:xmlunit-core MavenAll versions2.10.0
org.xmlunit:xmlunit-core MavenAll versions2.10.0

How do I fix CVE-2024-31573?

Upgrade org.xmlunit:xmlunit-core to 2.10.0 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2024-31573 being exploited?

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

Sources

Also known as CLEANSTART-2026-UV31886, CLSA-2024-1727136010, CLSA-2025-1740614445, CLSA-2026-1793128026, GHSA-chfm-68vv-pvw5, OESA-2025-1966 and 10 more.

Is CVE-2024-31573 in your software?

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

Check your SBOMs for free