CVE-2026-40021
mediumpriority · track · 21EPSS 0.008 · 55 %ileDEEUUSEPSS · scored 2026-10-27
Apache Log4net's XmlLayout https://logging.apache.org/log4net/manual/configuration/layouts.html#layout-list and XmlLayoutSchemaLog4J https://logging.apache.org/log4net/manual/configuration/layouts.html#layout-list , in versions before 3.3.0, fail to sanitize characters forbidden by the XML 1.0 specification https://www.w3.org/TR/xml/#charsets in MDC property keys and values, as well as the identity field that may carry attacker-influenced data. This causes an exception during serialization and the silent loss of the affected log event. An attacker who can influence any of these fields can exploit this to suppress individual log records, impairing audit trails and detection of malicious activity. Users are advised to upgrade to Apache Log4net 3.3.0, which fixes this issue.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–medium · 1.7–6.3
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (5)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2026-1054Apache log4net: Schwachstelle ermöglicht Manipulation von DateienDeutsch2026-04-12csaf · cert_bundDE
Ein entfernter, anonymer Angreifer kann eine Schwachstelle in Apache log4net ausnutzen, um Dateien zu manipulieren.
- GHSA-4f7c-pmjv-c25wApache Log4net: Silent log event loss in XmlLayout and XmlLayoutSchemaLog4J due to unescaped XML 1.0 forbidden characters2026-04-10ghsa · osvUS
Apache Log4net's XmlLayout https://logging.apache.org/log4net/manual/configuration/layouts.html#layout-list and XmlLayoutSchemaLog4J https://logging.apache.org/log4net/manual/configuration/layouts.html#layout-list , in versions before 3.3.0, fail to sanitize characters forbidden by the XML 1.0 specification https://www.w3.org/TR/xml/#charsets in MDC property keys and values, as well as the identity field that may carry attacker-influenced data. This causes an exception during serialization and the silent loss of the affected log event. An attacker who can influence any of these fields can exploit this to suppress individual log records, impairing audit trails and detection of malicious activity. Users are advised to upgrade to Apache Log4net 3.3.0, which fixes this issue.
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (18)
External citations — patches, advisories, analysis.
- http://www.openwall.com/lists/oss-security/2026/04/10/11cnnvd
- https://github.com/apache/logging-log4net/pull/280cnnvd
- https://lists.apache.org/thread/q8otftjswhk69n3kxslqg7cobr0x4st7cnnvd
- https://logging.apache.org/cyclonedx/vdr.xmlcnnvd
- https://logging.apache.org/log4net/download.htmlPatchcnnvd
- https://logging.apache.org/log4net/manual/configuration/layouts.htmlcnnvd
- https://logging.apache.org/security.html#CVE-2026-40021cnnvd
- https://github.com/apache/logging-log4net/pull/280enisa_euvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan