CVE-2026-34480: CWE-116 Improper Encoding or Escaping of Output in Apache Software Foundation Apache Log4j Core
Apache Log4j Core's XmlLayout https://logging.apache.org/log4j/2.x/manual/layouts.html#XmlLayout , in versions up to and including 2.25.3, fails to sanitize characters forbidden by the XML 1.0 specification https://www.w3.org/TR/xml/#charsets producing invalid XML output whenever a log message or MDC value contains such characters. The impact depends on the StAX implementation in use: * JRE built-in StAX: Forbidden characters are silently written to the output, producing malformed XML. Conforming parsers must reject such documents with a fatal error, which may cause downstream log-processing systems to drop the affected records. * Alternative StAX implementations (e.g., Woodstox https://github.com/FasterXML/woodstox , a transitive dependency of the Jackson XML Dataformat module): An exception is thrown during the logging call, and the log event is never delivered to its intended appender, only to Log4j's internal status logger. Users are advised to upgrade to Apache Log4j Core 2.25.4, which corrects this issue by sanitizing forbidden characters before XML output.
AI Analysis
Technical Summary
CVE-2026-34480 describes a vulnerability in Apache Log4j Core's XmlLayout up to version 2.25.3 where characters forbidden by the XML 1.0 specification are not properly sanitized. This leads to invalid XML output when such characters appear in log messages or MDC values. The impact varies by StAX implementation: the built-in JRE StAX silently writes forbidden characters producing malformed XML that conforming parsers reject, potentially causing downstream log processing failures; alternative StAX implementations like Woodstox throw exceptions during logging, preventing log events from reaching their intended appenders. Apache Log4j Core 2.25.4 addresses this by sanitizing forbidden characters before XML output.
Potential Impact
Malformed XML output can cause conforming XML parsers to reject log files with fatal errors, potentially disrupting downstream log processing systems. Alternatively, some StAX implementations throw exceptions that prevent log events from being delivered to their intended appenders, which may result in loss of log data. There is no indication of direct code execution or privilege escalation. The CVSS score of 6.9 (medium severity) reflects the potential for denial of service or loss of logging data integrity.
Mitigation Recommendations
Users should upgrade Apache Log4j Core to version 2.25.4 or later, where the issue is fixed by sanitizing forbidden XML characters before output. No other mitigations are indicated. Patch status is not explicitly stated in the vendor advisory excerpt, but the upgrade recommendation confirms an official fix is available.
CVE-2026-34480: CWE-116 Improper Encoding or Escaping of Output in Apache Software Foundation Apache Log4j Core
Description
Apache Log4j Core's XmlLayout https://logging.apache.org/log4j/2.x/manual/layouts.html#XmlLayout , in versions up to and including 2.25.3, fails to sanitize characters forbidden by the XML 1.0 specification https://www.w3.org/TR/xml/#charsets producing invalid XML output whenever a log message or MDC value contains such characters. The impact depends on the StAX implementation in use: * JRE built-in StAX: Forbidden characters are silently written to the output, producing malformed XML. Conforming parsers must reject such documents with a fatal error, which may cause downstream log-processing systems to drop the affected records. * Alternative StAX implementations (e.g., Woodstox https://github.com/FasterXML/woodstox , a transitive dependency of the Jackson XML Dataformat module): An exception is thrown during the logging call, and the log event is never delivered to its intended appender, only to Log4j's internal status logger. Users are advised to upgrade to Apache Log4j Core 2.25.4, which corrects this issue by sanitizing forbidden characters before XML output.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-34480 describes a vulnerability in Apache Log4j Core's XmlLayout up to version 2.25.3 where characters forbidden by the XML 1.0 specification are not properly sanitized. This leads to invalid XML output when such characters appear in log messages or MDC values. The impact varies by StAX implementation: the built-in JRE StAX silently writes forbidden characters producing malformed XML that conforming parsers reject, potentially causing downstream log processing failures; alternative StAX implementations like Woodstox throw exceptions during logging, preventing log events from reaching their intended appenders. Apache Log4j Core 2.25.4 addresses this by sanitizing forbidden characters before XML output.
Potential Impact
Malformed XML output can cause conforming XML parsers to reject log files with fatal errors, potentially disrupting downstream log processing systems. Alternatively, some StAX implementations throw exceptions that prevent log events from being delivered to their intended appenders, which may result in loss of log data. There is no indication of direct code execution or privilege escalation. The CVSS score of 6.9 (medium severity) reflects the potential for denial of service or loss of logging data integrity.
Mitigation Recommendations
Users should upgrade Apache Log4j Core to version 2.25.4 or later, where the issue is fixed by sanitizing forbidden XML characters before output. No other mitigations are indicated. Patch status is not explicitly stated in the vendor advisory excerpt, but the upgrade recommendation confirms an official fix is available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- apache
- Date Reserved
- 2026-03-28T15:29:27.095Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69d91fde1cc7ad14dacba289
Added to database: 4/10/2026, 4:05:50 PM
Last enriched: 4/10/2026, 4:21:18 PM
Last updated: 4/10/2026, 6:27:29 PM
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.