Apache Log4j 1XmlLayout XML Escape Flaw Fixed in 2.25.4
CVE-2026-34479 Published on April 10, 2026
Apache Log4j 1 to Log4j 2 bridge: Silent log event loss in Log4j1XmlLayout due to unescaped XML 1.0 forbidden characters
The Log4j1XmlLayout from the Apache Log4j 1-to-Log4j 2 bridge fails to escape characters forbidden by the XML 1.0 standard, producing malformed XML output. Conforming XML parsers are required to reject documents containing such characters with a fatal error, which may cause downstream log processing systems to drop or fail to index affected records.
Two groups of users are affected:
* Those using Log4j1XmlLayout directly in a Log4j Core 2 configuration file.
* Those using the Log4j 1 configuration compatibility layer with org.apache.log4j.xml.XMLLayout specified as the layout class.
Users are advised to upgrade to Apache Log4j 1-to-Log4j 2 bridge version 2.25.4, which corrects this issue.
Note: The Apache Log4j 1-to-Log4j 2 bridge is deprecated and will not be present in Log4j 3. Users are encouraged to consult the Log4j 1 to Log4j 2 migration guide https://logging.apache.org/log4j/2.x/migrate-from-log4j1.html , and specifically the section on eliminating reliance on the bridge.
Timeline
Vulnerability reported by Ap4sh and ethicxz
Independent report received from jabaltarik1 27 days later.
Fix shared publicly by Piotr P. Karwasz as pull request #4078 9 days later.
Fix verified by reporter 1 day later.
Log4j 2.25.4 released 3 days later.
Weakness Type
What is an Output Sanitization Vulnerability?
The software prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.
CVE-2026-34479 has been classified to as an Output Sanitization vulnerability or weakness.
Products Associated with CVE-2026-34479
Want to know whenever a new CVE is published for Apache Log4j 1 2 Api? stack.watch will email you.
Affected Versions
Apache Software Foundation Apache Log4j 1 to Log4j 2 bridge:- Version 2.7 and below 2.25.4 is affected.
- Version 3.0.0-alpha1, <= 3.0.0-beta2 is affected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.