XML Layout Vulnerability in Apache Log4net Affects Logging Functionality
CVE-2026-40021
6.3MEDIUM
What is CVE-2026-40021?
Apache Log4net's XmlLayout and XmlLayoutSchemaLog4J prior to version 3.3.0 have a vulnerability that fails to properly sanitize characters restricted by the XML 1.0 specification in MDC property keys and values. This issue allows an attacker to manipulate the identity field, which can lead to exceptions during serialization and ultimately result in the silent loss of logs. Consequently, this vulnerability can obstruct audit trails and hinder the detection of malicious activities. Users are recommended to update to Apache Log4net version 3.3.0 or later to mitigate this issue.
Affected Version(s)
Apache Log4net 0 < 3.3.0