CVE-2026-40021
MEDIUMDescription
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.
How to fix
Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.
CVSS v3 Vector
Exploitability
Impact
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Exploit Intelligence
Moderate risk: more likely to be exploited than 50% of all known CVEs.
References
Related Vulnerabilities
Other CWE-116 vulnerabilities, ordered by exploit likelihood. View all
| CVE | Severity | CVSS | EPSS | Exploited | Fix |
|---|---|---|---|---|---|
| CVE-2024-38475 | Critical | 9.1 | 100% | KEV | Fix |
| CVE-2022-36446 | Critical | 9.8 | 96% | - | Fix |
| CVE-2021-31806 | Medium | 6.5 | 96% | - | Fix |
| CVE-2022-30781 | High | 7.5 | 88% | - | Fix |
| CVE-2022-36099 | Critical | 9.9 | 76% | - | Fix |
| CVE-2022-36100 | Critical | 9.9 | 74% | - | Fix |
Embed a live status badge for CVE-2026-40021
Markdown
[](https://tridentstack.com/cve/CVE-2026-40021)HTML
<a href="https://tridentstack.com/cve/CVE-2026-40021"><img src="https://tridentstack.com/cve/badge/CVE-2026-40021.svg" alt="CVE-2026-40021"></a>Find and fix vulnerabilities across your fleet
TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.
Start freeThis product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2026-04-22.