patchminder
No public exploit found CVE-2026-40021

Vulnerabilityin Apache log4net.

Published 10 Apr 2026 · Updated 10 Apr 2026 · Every fact sourced

JSONCite
Is it exploited?
Not confirmed

No public exploit found; not on exploited lists.

Severity
Medium 6.3
CVSSA severity score from 0 to 10. 9 and higher is critical. 4.0 · no login needed
Attack likelihood
Low
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 0.9% chance in 30 days · 4 Dec 2026
Fix
Available
Upgrade to 3.3.0 or later
In plain words

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.

What to do now
  • Upgrade Apache Log4net to 3.3.0 or later.
  • Upgrade log4net (NuGet) to 3.3.0 or later.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
Apache Log4net
before 3.3.0
3.3.0
CVE record
log4net (NuGet)
before 3.3.0
3.3.0
GitHub advisory

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 8 Apr 2026
    CVE ID reserved by apache.
  2. 10 Apr 2026
    Published in the CVE List.
  3. 10 Apr 2026
    CVE record last updated.
Exploit code

Attack code anyone can find

Exploit maturity: No public exploit found. CISA assessment (SSVC): exploitation none.

Metasploit module
None known
Nuclei scan template
None known
Exploit-DB
None known
GitHub proof of concepts
None known

Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.

Related

Other log4net vulnerabilities

Same weakness: Improper output encoding

All CWE-116 vulnerabilities

References
Cite this page

Patchminder. CVE-2026-40021: Vulnerability in Apache log4net. https://patchminder.com/cve/cve-2026-40021/ (accessed 5 December 2026).