CVEfocus › CVE database › CVE-2026-40021

CVE-2026-40021Apache Log4net: Silent log event loss in XmlLayout and XmlLayoutSchemaLog4J due to…

CVSS 6.3 MediumEPSS 1.0% (higher than 62% of CVEs)Published 2026-04-10Updated 2026-04-10Assigner: apache

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.

CWE-116

What to do

Fixed builds are available from Debian: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
5Fix pending
3Under investigation
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10log4netFix pendingUBUNTU-CVE-2026-40021
Ubuntu 26.04log4netUnder investigationUBUNTU-CVE-2026-40021
Ubuntu 25.10log4netWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-40021
Ubuntu 24.04log4netUnder investigationUBUNTU-CVE-2026-40021
Ubuntu 22.04log4netUnder investigationUBUNTU-CVE-2026-40021
Ubuntu 20.04log4netFix pendingUBUNTU-CVE-2026-40021
Ubuntu 18.04log4netFix pendingUBUNTU-CVE-2026-40021
Ubuntu 16.04log4netFix pendingUBUNTU-CVE-2026-40021
Debian 14log4netFixed1.2.10+dfsg-10DEBIAN-CVE-2026-40021
Debian 13log4netFix pendingDEBIAN-CVE-2026-40021

What the vendor says

As published in the CVE record by apache, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.