Description
A flaw was found in the xmlSetTreeDoc() function of the libxml2 XML parsing library. This function is responsible for updating document pointers when XML nodes are moved between documents. Due to improper handling of namespace references, a namespace pointer may remain linked to a freed memory region when the original document is destroyed. As a result, subsequent operations that access the namespace can lead to a use-after-free condition, causing an application crash.
Problem types
Product status
Timeline
| 2025-11-07: | Reported to Red Hat. |
| 2025-11-07: | Made public. |
Credits
Red Hat would like to thank Ahmed Lekssays for reporting this issue.
References
access.redhat.com/security/cve/CVE-2025-12863
bugzilla.redhat.com/show_bug.cgi?id=2413323 (RHBZ#2413323)