Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-40021: CWE-116 Improper Encoding or Escaping of Output in Apache Software Foundation Apache Log4net

0
Medium
VulnerabilityCVE-2026-40021cvecve-2026-40021cwe-116
Published: Fri Apr 10 2026 (04/10/2026, 15:44:17 UTC)
Source: CVE Database V5
Vendor/Project: Apache Software Foundation
Product: Apache Log4net

Description

Apache Log4net versions before 3. 3. 0 have a vulnerability in their XmlLayout and XmlLayoutSchemaLog4J components where forbidden XML 1. 0 characters in certain fields are not properly sanitized. This can cause exceptions during log serialization, resulting in silent loss of log events. An attacker able to influence these fields can suppress individual log records, potentially impairing audit trails and detection of malicious activity. Users are advised to upgrade to version 3. 3. 0 where this issue is fixed.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 04/10/2026, 16:20:58 UTC

Technical Analysis

Apache Log4net's XmlLayout and XmlLayoutSchemaLog4J prior to version 3.3.0 do not properly sanitize characters forbidden by the XML 1.0 specification in MDC property keys, values, and the identity field. This improper encoding or escaping leads to exceptions during serialization and causes affected log events to be silently lost. The vulnerability allows an attacker who can control these fields to suppress specific log entries, undermining logging reliability and audit trail integrity. The issue is addressed in Apache Log4net 3.3.0.

Potential Impact

The vulnerability causes loss of individual log records when forbidden XML characters are present in attacker-controlled fields, which can impair audit trails and hinder detection of malicious activities. There is no indication of remote code execution or data disclosure. The impact is limited to logging reliability and forensic capabilities.

Mitigation Recommendations

Users should upgrade to Apache Log4net version 3.3.0, which fixes this issue by properly sanitizing forbidden XML characters. No other mitigation or temporary workaround is indicated. Patch status is not explicitly stated but the vendor advises upgrading to 3.3.0 as the fix.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
apache
Date Reserved
2026-04-08T10:03:43.840Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 69d91fde1cc7ad14dacba2a0

Added to database: 4/10/2026, 4:05:50 PM

Last enriched: 4/10/2026, 4:20:58 PM

Last updated: 4/10/2026, 5:33:27 PM

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses