CVE-2026-34480: Apache Log4j Core: Silent log event loss in XmlLayout due to unescaped XML 1.0 forbidden characters
Apache Log4j Core's XmlLayout
Other sources
Apache Log4j Core's XmlLayout, in versions up to and including 2.25.3, fails to sanitize characters forbidden by the XML 1.0 specification, 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, 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.
— GitHub
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
maven/org.apache.logging.log4j:log4j-coreto a version that resolves this vulnerability.Fixed in 3.0.0-beta3 - Upgrade
Upgrade
maven/org.apache.logging.log4j:log4j-coreto a version that resolves this vulnerability.Fixed in 2.25.4 - Upgrade
Upgrade
Apache Log4j Coreto a version that resolves this vulnerability.Fixed in 2.25.4Patch CVE-2026-34480
Event History
Frequently Asked Questions
What is the severity of CVE-2026-34480?
The severity of CVE-2026-34480 is classified as important due to its potential to cause silent log event loss.
How do I fix CVE-2026-34480?
To fix CVE-2026-34480, upgrade to version 2.25.4 or later, or to 3.0.0-beta3.
What versions are affected by CVE-2026-34480?
CVE-2026-34480 affects Apache Log4j Core versions up to and including 2.25.3.
What is the impact of CVE-2026-34480?
The impact of CVE-2026-34480 is the silent loss of log events due to unescaped forbidden XML characters.
Is there a workaround for CVE-2026-34480?
There is no documented workaround for CVE-2026-34480; upgrading to a patched version is recommended.