← Vulnerability feed

Vulnerability record · CVE-2026-40021 · published 10 April 2026

CVE-2026-40021: Apache log4net vulnerability

Apache · Log4net

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.

6.3 CVSS 4.0 Medium EPSS 0.98% · top 39.2% CWE-116 · CWE-116
6.3CVSS 4.0 base score
0.98%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
6References
17 Jun 2026Last modified by NVD

Description

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:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2026-40021 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2018-1285Apache log4net xml external entity (xxe) vulnerabilityApache log4net versions before 2.0.10 do not disable XML external entities when parsing log4net configuration files. This allows for XXE-based attack…EPSS 17%5.0CVE-2006-0743Apache log4net vulnerabilityFormat string vulnerability in LocalSyslogAppender in Apache log4net 1.2.9 might allow remote attackers to cause a denial of service (memory corrupti…EPSS 6.4%7.8CVE-2026-20245Cisco Catalyst SD-WAN CLI command injection via crafted file uploadCisco Catalyst SD-WAN Controller, Manager and Validator fail to properly validate user-supplied input in the CLI, allowing an authenticated local att…KEVEPSS 25%analysed9.1CVE-2024-38475Apache HTTP Server mod_rewrite improper escaping enables code executionApache HTTP Server 2.4.59 and earlier has an improper output escaping flaw in mod_rewrite. Substitutions in server context that use a backreference o…KEVEPSS 100%analysed9.8CVE-2022-42948Cobalt Strike UI HTML injection leads to remote code executionCobalt Strike 4.7.1 fails to escape HTML tags rendered in its Swing UI components. Crafted HTML injected into that UI can execute code in the Cobalt …KEVEPSS 2.7%analysed6.1CVE-2022-24682Zimbra Collaboration Suite Calendar stored XSS via unescaped HTML attributesThe Calendar feature in Zimbra Collaboration Suite 8.8.x before 8.8.15 patch 30 (update 1) fails to escape HTML placed inside element attributes, all…KEVEPSS 31%analysed

Source: NIST National Vulnerability Database (record CVE-2026-40021), CISA KEV, FIRST EPSS (scores of 2026-09-28). This page is refreshed as NVD updates the record.