{"id":"CVE-2024-31573","aliases":["CVE-2024-31573","GHSA-chfm-68vv-pvw5"],"related":[],"kind":"vulnerability","state":"published","title":"XMLUnit for Java has Insecure Defaults when Processing XSLT Stylesheets","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nWhen performing XSLT transformations XMLUnit for Java did not disable XSLT extension functions by default. Depending on the XSLT processor being used this could allow arbitrary code to be executed when XMLUnit is used to transform data with a stylesheet who's source can not be trusted. If the stylesheet can be provided externally this may even lead to a remote code execution.\n\n## Patches\nUsers are advised to upgrade to XMLUnit for Java 2.10.0 where the default has been changed by means of https://github.com/xmlunit/xmlunit/commit/b81d48b71dfd2868bdfc30a3e17ff973f32bc15b\n\n### Workarounds\nXMLUnit's main use-case is performing tests on code that generates or processes XML. Most users will not use it to perform arbitrary XSLT transformations.\n\nUsers running XSLT transformations with untrusted stylesheets should explicitly use XMLUnit's APIs to pass in a pre-configured TraX `TransformerFactory` with extension functions disabled via features and attributes. The required `setFactory` or `setTransformerFactory` methods have been available since XMLUnit for Java 2.0.0.\n\n### References\n[Bug Report](https://github.com/xmlunit/xmlunit/issues/264)\n[JAXP Security Guide](https://docs.oracle.com/en/java/javase/22/security/java-api-xml-processing-jaxp-security-guide.html#GUID-E345AA09-801E-4B95-B83D-7F0C452538AA)","format":"markdown","source":"ghsa"},{"lang":"es","text":"XMLUnit para Java anterior a 2.10.0, en la configuración predeterminada, podría permitir la ejecución de código a través de una hoja de estilo no confiable (utilizada para una transformación XSLT), porque las funciones de extensión XSLT están habilitadas.","source":"nvd"}],"published":"2024-05-01T16:40:01.000Z","modified":"2026-10-02T00:10:00.180Z","severity":{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","score":4,"rating":"MEDIUM"},"severities":[{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","score":4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"rating","rating":"LOW"}],"cwes":["CWE-669"],"affected":[{"ranges":[{"type":"semver","introduced":"2.0.0","fixed":"2.10.0","status":"affected"}],"vendor":"XMLUnit","product":"XMLUnit for Java","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.10.0"}],"ecosystem":"Maven","package":"org.xmlunit:xmlunit-core","purl":"pkg:maven/org.xmlunit/xmlunit-core","source":"ghsa"}],"references":[{"url":"https://github.com/advisories/GHSA-chfm-68vv-pvw5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://github.com/xmlunit/xmlunit/issues/264","tags":["exploit","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/xmlunit/xmlunit/commit/b81d48b71dfd2868bdfc30a3e17ff973f32bc15b","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/xmlunit/xmlunit/security/advisories/GHSA-chfm-68vv-pvw5","tags":["web"],"sources":["ghsa"]},{"url":"https://docs.oracle.com/en/java/javase/22/security/java-api-xml-processing-jaxp-security-guide.html#GUID-E345AA09-801E-4B95-B83D-7F0C452538AA","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/xmlunit/xmlunit","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-10-17T19:03:35.746Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-31573","url":"https://www.cve.org/CVERecord?id=CVE-2024-31573","licence":"CVE Terms of Use","modified":"2025-10-17T19:04:05.637Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-chfm-68vv-pvw5","url":"https://github.com/advisories/GHSA-chfm-68vv-pvw5","licence":"CC-BY-4.0","modified":"2024-12-05T05:28:04.518Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-31573","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-31573","licence":"Public domain","modified":"2026-10-02T00:10:00.180Z"}],"updatedAt":"2026-11-25T22:58:52.896Z","epss":{"score":0.0032,"percentile":0.26933,"date":"2026-12-01T12:00:22.000Z"}}