libxml2: use-after-free when parsing XPath in Schematron (CVE-2025-49794)
A use-after-free vulnerability (CVSS 9.1) was found in libxml2. It occurs when parsing XPath elements while the XML Schematron contains schema elements. A crafted XML document can crash the program or cause other undefined behavior.
Checked in Shield: yes
Who is affected
Applications that use libxml2 and parse untrusted XML with Schematron. The source does not state which versions are vulnerable.
How to check
Check whether libxml2 is installed and which version (e.g. dpkg -l libxml2 on Debian-like systems), including inside container images. Find out whether your applications parse untrusted XML with Schematron.
How to fix
Patch status is not stated in the source. Watch for libxml2 package updates from your distribution, then update the package and rebuild images once a fix is released.
What Shield checks free
The libxml2 version is not visible from outside, so there is no direct check. If the server shows its PHP version in the X-Powered-By or Server headers, Shield flags it in the report: on your server you can then see which libxml2 that PHP build uses (php -i | grep -i libxml). Free.
Good to know
Not disclosed yet: affected and fixed versions, exploitation status. Source: NVD, CVE-2025-49794.