CVE-2026-11979: libxml2 xmlcatalog Stack Buffer Overflow Vulnerability
libxml2's xmlcatalog utility contains a stack-based buffer overflow vulnerability in its interactive shell mode. When a user provides unusually long input lines, the application fails to validate the length before copying that data into fixed-size memory buffers on the stack. This memory corruption can crash the program or, in a worst-case scenario, allow an attacker to execute arbitrary code with the privileges of the user running xmlcatalog. The issue affects the command-parsing logic within the usershell() function.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-121
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-29 / 2026-06-30
NVD description (verbatim)
libxml2 is vulnerable to multiple stack-based buffer overflows in the xmlcatalog utility when running in --shell mode. The usershell() function processes user input using fixed-size stack buffers without proper bounds checking. By supplying an overly long input line, an attacker can overflow internal buffers (command, arg, and argv) during input parsing. This results in memory corruption within the stack frame. Successful exploitation may cause a crash or potentially allow arbitrary code execution in the context of the xmlcatalog process. This issue has been fixed in the commit c2e233fc. NOTE: The maintainers of this project did not agree that this issue is a vulnerability and considered it a bug.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-11979 is a stack-based buffer overflow (CWE-121) in libxml2's xmlcatalog utility, specifically triggered during --shell mode operation. The usershell() function processes user input into fixed-size stack buffers (command, arg, and argv) without adequate bounds checking. Supplying input exceeding the buffer capacity causes a stack overflow, corrupting memory within the process stack frame. Successful exploitation may lead to denial of service via crash or, under favorable conditions, code execution in the context of the xmlcatalog process. The vulnerability has been addressed in commit c2e233fc. Note that libxml2 maintainers disputed the security severity classification, treating it primarily as a logic bug rather than an exploitable vulnerability.
Business impact
Organizations relying on xmlcatalog for XML catalog management in automated workflows or interactive administration face potential service disruption through denial of service. If xmlcatalog runs with elevated privileges or processes untrusted XML sources, exploitation could allow lateral movement or privilege escalation. The impact is generally limited to local systems since the vulnerability requires direct user input to the --shell mode, but admin workstations or CI/CD pipelines using xmlcatalog may be at risk if they accept or process attacker-supplied catalog data.
Affected systems
The vulnerability affects libxml2 (xmlsoft libxml2). Any system running a vulnerable version of libxml2 and exposing the xmlcatalog utility with --shell mode capabilities is potentially affected. This includes developer workstations, systems administering XML catalogs, and infrastructure using libxml2-based tools. Desktop environments and servers bundling or compiling libxml2 from source are exposure points.
Exploitability
Exploitation requires local access and active interaction with xmlcatalog in --shell mode. An attacker must supply malicious input directly to the interactive shell interface. The CVSS vector (AV:L/AC:L/PR:N/UI:R) reflects that this is a local attack surface with low attack complexity, but user interaction is necessary (the user must run xmlcatalog and provide or accept the malicious input). Remote exploitation is not feasible unless xmlcatalog is exposed through a network-facing application, which is uncommon. The practical exploitability is moderate; denial of service via crash is more likely than code execution under modern exploit mitigations.
Remediation
Upgrade libxml2 to a patched version incorporating commit c2e233fc or later. Verify the specific patched version against the vendor advisory, as release version numbers depend on the libxml2 release schedule. Until patching is feasible, restrict access to xmlcatalog and avoid using --shell mode with untrusted input sources. If xmlcatalog is embedded in an application, check whether the application's version of libxml2 includes this fix.
Patch guidance
Apply the latest libxml2 update from xmlsoft.org or your distribution's package repository that includes the fix commit c2e233fc. For systems using libxml2 from source, pull the patched commit and rebuild. Distributions typically release patched versions within weeks of the CVE publication; verify your vendor's advisory for specific version numbers and availability timelines. Test patches in a non-production environment before rolling out widely, especially if xmlcatalog is integral to catalog processing pipelines.
Detection guidance
Monitor for crashes or unexpected termination of xmlcatalog processes, particularly in admin scripts or automated workflows. Review xmlcatalog command logs for unusually long or malformed input lines that might indicate exploitation attempts. System call tracing (e.g., strace) on xmlcatalog invocations can reveal stack buffer access patterns. Check running processes to identify instances of xmlcatalog in --shell mode and audit whether they are exposed to untrusted input sources. Log analysis for segmentation faults or core dumps tied to xmlcatalog can indicate attempted exploitation.
Why prioritize this
Although marked HIGH severity (CVSS 7.8), this vulnerability's practical risk is tempered by its local-only attack vector and requirement for user interaction. Prioritize patching if xmlcatalog runs in automated, user-facing, or low-privilege-boundary environments. If your organization does not actively use xmlcatalog or controls its input strictly, this can be scheduled as a standard maintenance update rather than an emergency patch. Organizations in regulated industries or those running xmlcatalog on multi-user systems should prioritize higher due to potential lateral movement risks.
Risk score, explained
The CVSS 7.8 HIGH score reflects high impact (confidentiality, integrity, and availability all affected), low attack complexity, and no privilege requirements. However, the local attack vector and required user interaction reduce real-world exploitability. The maintainers' dispute over classification suggests the issue may be more of a hardening matter than an actively weaponized threat. Adjust internal risk ratings downward if xmlcatalog is not exposed to untrusted users or if it operates in restricted environments with strong input validation elsewhere in the stack.
Frequently asked questions
Do I need to patch immediately if xmlcatalog is not actively used in my environment?
No, immediate patching is not critical if xmlcatalog is not part of your operational workflows or is not exposed to untrusted input. Schedule patching as part of routine maintenance updates. However, if you bundle or rely on libxml2 for other purposes (XML parsing libraries in applications), verify that your libxml2 version is updated anyway, as libxml2 is widely used.
Can this vulnerability be exploited remotely?
No, this is a local-only vulnerability requiring direct interaction with the xmlcatalog utility in --shell mode. Remote exploitation is not feasible unless an application explicitly exposes xmlcatalog over the network, which is extremely uncommon. The attack surface is limited to local users or privileged processes on the same system.
What is the difference between the maintainers' view and the CVSS score?
The libxml2 maintainers classified this as a bug rather than a security vulnerability, disagreeing with the CVSS 7.8 rating. Their position suggests they believe the issue is a logic error in input handling rather than an exploitable security flaw under realistic threat scenarios. However, a buffer overflow with potential code execution implications still warrants patching. Use your own risk assessment: if the threat model includes local attackers or malicious input, treat it seriously; if not, it can be deprioritized.
How do I know if commit c2e233fc is in my libxml2 version?
Check the version string of your libxml2 package (e.g., 'xmllint --version'). Consult the libxml2 release notes or commit history on GitHub to determine which version numbers include the fix commit c2e233fc. If you compile from source, verify that your checked-out commit hash is at or after c2e233fc in the repository history. Contact your distribution maintainer or check their security advisory for the exact patched version number.
This analysis is provided for informational purposes and reflects the vulnerability data available as of the publication date. The libxml2 maintainers have disputed the security severity classification; organizations should conduct their own risk assessments based on their specific environment and threat model. Patch availability, version numbers, and release timelines vary by distribution and should be verified against official vendor advisories. No exploit code or weaponized proof-of-concept has been included. This document does not constitute legal or compliance advice. Always test patches in non-production environments before deployment. Source: NVD (public-domain), retrieved 2026-08-08. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2018-25383HIGHFree MP3 CD Ripper 2.8 Stack Overflow – ROP and DEP Bypass Risk
- CVE-2025-52292HIGHGPAC MP4Box Stack Buffer Overflow Denial of Service
- CVE-2025-60474HIGHMP4Box Buffer Overflow DoS Vulnerability – GPAC Project
- CVE-2025-66280HIGHQNAP Integer Overflow Vulnerability: Patch & Risk Assessment
- CVE-2026-10062HIGHTRENDnet TEW-432BRP Stack Overflow – EOL Hardware Risk
- CVE-2026-10063HIGHTRENDnet TEW-432BRP Stack Overflow – End-of-Life Router Vulnerability
- CVE-2026-10065HIGHShibby Tomato 1.28 Stack Buffer Overflow in tomatodata.cgi
- CVE-2026-10066HIGHShibby Tomato Stack Buffer Overflow in UPS Service (RCE)