CVE-2026-40021
CVE-2026-40021 — Apache Log4net: Silent log event loss in XmlLayout and XmlLayoutSchemaLog4J due to unescaped XML 1.0 forbidden characters
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.
Published Updated Sources: cvelistV5, apache
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
<1%
chance of exploitation in 30 days
CVSS base
6.3
MEDIUM
CISA SSVC assessment
Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.
Exploitation
None
none · proof-of-concept · active
Automatable
No
can an attacker script all four kill-chain steps
Technical impact
Partial
partial · total control of the vulnerable component
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Vendors (1)
Products (1)
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 6.3 | CVSS 4.0 | MEDIUM | n/a | n/a | cvelistV5 |
Weakness & attack patterns
- CWE-116
Detection
Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.
- Search application, proxy, and WAF logs for requests touching //logging.apache.org/log4net/manual/configuration/layouts.html#layout-list, //www.w3.org/TR/xml/#charsets.
References
6 on the record
- github.com/apache/logging-log4net/pull/280
patch
- logging.apache.org/security.html#CVE-2026-40021
vendor-advisory
- logging.apache.org/cyclonedx/vdr.xml
vendor-advisory
- logging.apache.org/log4net/manual/configuration/layouts.html
related
- lists.apache.org/thread/q8otftjswhk69n3kxslqg7cobr0x4st7
vendor-advisory
- www.openwall.com/lists/oss-security/2026/04/10/11
reference
Related CVEs
Same product first, then the same weakness or threat actor.
- CVE-2024-10441 Synology DiskStation Manager (DSM) Improper Encoding or Escaping of Output VulnerabilityCVSS 9.8 · CISA KEV
- CVE-2022-42948 Fortra Cobalt Strike User Interface Remote Code Execution VulnerabilityCVSS 9.8 · CISA KEV
- CVE-2024-38475 Apache HTTP Server weakness in mod_rewrite when first segment of substitution matches filesystem path.CVSS 9.1 · CISA KEV
- CVE-2026-20245 Cisco Catalyst SD-WAN Controller Authenticated Privilege Escalation VulnerabilityCVSS 7.8 · CISA KEV
- CVE-2022-24682 Synacor Zimbra Collaborate Suite (ZCS) Cross-Site Scripting VulnerabilityCVSS 6.1 · CISA KEV
- CVE-2026-126170 A improper encoding or escaping of output vulnerability in Fortinet FortiAnalyzer 8.0.0 through 8.0.2, FortiAnalyzer 7.6.0 through 7.6.7…CVSS 9.8
Elsewhere on this site
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.