
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-40023 is a vulnerability in Apache Log4cxx's XMLLayout component that allows attackers who can influence logged data to inject XML 1.0 forbidden characters into log messages, NDC, and MDC property keys/values, producing invalid XML output that conforming parsers must reject with a fatal error. This can cause downstream log processing systems to silently drop or fail to index affected log records, impairing audit trails. Affected versions include Apache Log4cxx before 1.7.0 (including Conan and Brew distributions). The vulnerability was reported by Olawale Titiloye on 2026-03-15 and publicly disclosed on 2026-04-10. It carries a CVSS v3.1 score of 5.3 (Medium) and a CVSS v4.0 score of 6.3 (Medium) (Github Advisory, Openwall OSS-Sec).
The root cause is classified as CWE-116 (Improper Encoding or Escaping of Output): the XMLLayout formatter in Apache Log4cxx fails to sanitize or escape characters that are forbidden by the XML 1.0 specification (e.g., certain control characters) before embedding them in XML-formatted log output (Github Advisory). An attacker with the ability to influence data that gets logged — such as through user-supplied input in HTTP request parameters, headers, or application fields — can craft input containing these forbidden characters. When the application logs this data via XMLLayout, the resulting XML document becomes malformed, and any conforming XML parser processing the log stream will raise a fatal error and reject the document. The fix, implemented in pull request #609, uses character references for control characters in XML and HTML output and strips illegal characters from attribute text (GitHub PR #609).
The primary impact is on the integrity of audit trails and security monitoring: an attacker can cause individual log records to be silently dropped or fail to be indexed by downstream log processing systems (e.g., SIEMs, log aggregators), effectively suppressing evidence of malicious activity (Github Advisory, Openwall OSS-Sec). There is no direct confidentiality or availability impact on the vulnerable system itself; the affected system impact metrics show no compromise of confidentiality, integrity, or availability of the logging host. However, the subsequent system impact includes low integrity impact on downstream log processing infrastructure, as log records may be selectively suppressed to conceal attacker actions.
There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation at this time (Github Advisory). The EPSS score is approximately 0.157–0.292%, indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires the attacker to control or influence data that is logged by an application using XMLLayout, which is a common but not universal configuration. No threat actor attribution has been reported.
XMLLayout configured as the log output format.User-Agent, X-Forwarded-For), form fields, or MDC/NDC values set from user-supplied data.\x01–\x08, \x0B, \x0C, \x0E–\x1F, \x7F–\x84, \x86–\x9F) that will be embedded in the XML log output.XMLLayout, causing the resulting XML log document to be malformed.XMLLayout.0x01–0x08, 0x0B, 0x0C, 0x0E–0x1F) in HTTP headers, parameters, or body fields that are reflected in application logs.Upgrade Apache Log4cxx to version 1.7.0 or later, which strips illegal XML 1.0 characters and uses character references for control characters in XML and HTML output (Github Advisory, GitHub PR #609). If immediate patching is not possible, implement input validation and filtering at the application layer to prevent forbidden XML characters from reaching the logging subsystem. Additionally, monitor downstream log processing systems for unexpected XML parse errors or dropped records that may indicate exploitation attempts.
The vulnerability was disclosed via the Apache security mailing list and the oss-security list by Piotr Karwasz on 2026-04-10, crediting Olawale Titiloye as the finder (Openwall OSS-Sec). OpenSUSE issued a security announcement for affected packages, and Tenable published Nessus detection plugins (IDs 306018 and 313699) for the vulnerability. Community reaction has been measured given the moderate severity and lack of active exploitation.
Fix availability across major Linux distributions and their releases.
bionic (esm-apps)
log4cxx
devel
log4cxx
focal (esm-apps)
log4cxx
jammy
log4cxx
jammy (esm-apps)
log4cxx
noble
log4cxx
noble (esm-apps)
log4cxx
resolute
log4cxx
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."