# CVE-2026-40021: log4net: Apache Log4net's  XmlLayout https://logging.apache.org/log4net/manual/configuration/layouts.html#layout-list  and  Xm...

CVE-2026-40021 is fixed in 5 products on 1 platform, first by DEBIAN-CVE-2026-40021, released April 10, 2026. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2026-40021
- Priority: Routine
- CVSS: 5.3 (medium)
- EPSS: 0.0080
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Apr 10, 2026

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | log4net Debian 14 | 1.2.10+dfsg-10 | [DEBIAN-CVE-2026-40021](https://patchblox.com/security/data/fix/linux/debian-cve-2026-40021.md) | Apr 10, 2026 |
| Linux | log4net Fedora 43 | 3.5.0-1.fc43 | [FEDORA-2026-588BC7E01C](https://patchblox.com/security/data/fix/linux/fedora-2026-588bc7e01c.md) | Oct 7, 2026 |
| Linux | log4net-devel Fedora 43 | 3.5.0-1.fc43 | [FEDORA-2026-588BC7E01C](https://patchblox.com/security/data/fix/linux/fedora-2026-588bc7e01c.md) | Oct 7, 2026 |
| Linux | nant Fedora 43 | 1:0.92-43.fc43 | [FEDORA-2026-588BC7E01C](https://patchblox.com/security/data/fix/linux/fedora-2026-588bc7e01c.md) | Oct 7, 2026 |
| Linux | nant-devel Fedora 43 | 1:0.92-43.fc43 | [FEDORA-2026-588BC7E01C](https://patchblox.com/security/data/fix/linux/fedora-2026-588bc7e01c.md) | Oct 7, 2026 |
| Linux | nant-docs Fedora 43 | 1:0.92-43.fc43 | [FEDORA-2026-588BC7E01C](https://patchblox.com/security/data/fix/linux/fedora-2026-588bc7e01c.md) | Oct 7, 2026 |

---

Data as of 2026-11-09T13:31:49Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
