Read the docs
TI-2026-28864 Aliases CVE-2026-40021GHSA-4f7c-pmjv-c25w

Improper output encoding in Apache Log4net

Priority LOW 29CWE-116Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
Attack requirements
None
Impact type
—
Confidentiality · integrity · availability
None · None · None
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00802 56th percentileScored 2026-11-07
Fix Fixed Apache Log4net (Apache Software Foundation): 3.3.0log4net (NuGet): 3.3.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
ApacheApache Log4netbefore 3.3.03.3.0Patch availableCNA
—log4net (NuGet)before 3.3.03.3.0Patch availableGHSA-4f7c-pmjv-c25w
  • Apache Log4net VendorApache Affected before 3.3.0 Fixed in 3.3.0 Patch available CNA
  • log4net (NuGet) Vendor— Affected before 3.3.0 Fixed in 3.3.0 Patch available GHSA-4f7c-pmjv-c25w

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:apache:log4net:*:*:*:*:*:*:*:*before 3.3.0VulnerableApache
  • cpe:2.3:a:apache:log4net:*:*:*:*:*:*:*:* Versions before 3.3.0 Vulnerable ·Apache

Remediation

  • Fix · CNA Apache Log4net (Apache Software Foundation) Fixed in 3.3.0
  • Fix · GHSA-4f7c-pmjv-c25w log4net (NuGet) Fixed in 3.3.0 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-40021
  2. 2026-10-03 Alias added: GHSA-4f7c-pmjv-c25w

References

  • TI-2018-01190 XML external entity injection in Apache log4net CVSS 3.1CRITICAL 9.8
  • TI-2026-68924 RemoteSyslogAppender in Apache log4net silently drops non-ASCII text CVSS 3.1MEDIUM 5.3
  • TI-2026-68923 Apache log4net EventLogAppender silently discards oversize records CVSS 3.1MEDIUM 5.3
  • TI-2026-68922 Log4net drops log events when ASP.NET request validation fails CVSS 3.1MEDIUM 5.3
  • TI-2026-68921 Unencodable content drops a whole batch in Apache log4net appender CVSS 3.1MEDIUM 5.3
  • TI-2026-68920 NUL character truncates log records in Apache log4net debug output CVSS 3.1MEDIUM 5.3
See all 8 →

Sources