CVE-2026-137074: libxml2 2.12.6 through 2.15.4 NULL Pointer Dereference via xmlTextReaderConstEncoding()
GNOME libxml2 2.12.6 through 2.15.4 contains a NULL pointer dereference vulnerability in xmlTextReaderConstEncoding() after a reader is reset with xmlReaderNewWalker(). Because xmlCtxtReset() leaves ctxt->input NULL, querying the document encoding makes xmlGetActualEncoding() read ctxt->input->flags without a check, crashing the application and causing denial of service.
Affected Software
Event History
Frequently Asked Questions
What application behavior is required to trigger the crash?
An application must reset an XML reader with xmlReaderNewWalker() and then call xmlTextReaderConstEncoding(). In the affected state, the reset leaves ctxt->input NULL and the encoding query can dereference it.
What is the security impact if the flaw is triggered?
The documented impact is denial of service due to an application crash. The provided vector indicates no confidentiality or integrity impact.
What versions should be reviewed?
Review deployments using GNOME libxml2 versions 2.12.6 through 2.15.4, especially applications that use the XML reader APIs and the reset-and-encoding-query sequence.