Apache Log4j Core Rfc5424Layout CRLF Injection 2.21.0-2.25.3
CVE-2026-34478 Published on April 10, 2026
Apache Log4j Core: Log injection in Rfc5424Layout due to silent configuration incompatibility
Apache Log4j Core's Rfc5424Layout https://logging.apache.org/log4j/2.x/manual/layouts.html#RFC5424Layout , in versions 2.21.0 through 2.25.3, is vulnerable to log injection via CRLF sequences due to undocumented renames of security-relevant configuration attributes.
Two distinct issues affect users of stream-based syslog services who configure Rfc5424Layout directly:
* The newLineEscape attribute was silently renamed, causing newline escaping to stop working for users of TCP framing (RFC 6587), exposing them to CRLF injection in log output.
* The useTlsMessageFormat attribute was silently renamed, causing users of TLS framing (RFC 5425) to be silently downgraded to unframed TCP (RFC 6587), without newline escaping.
Users of the SyslogAppender are not affected, as its configuration attributes were not modified.
Users are advised to upgrade to Apache Log4j Core 2.25.4, which corrects this issue.
Timeline
Vulnerability reported by Samuli Leinonen
Candidate patch shared internally by Piotr P. Karwasz 75 days later.
Fix shared publicly by Piotr P. Karwasz as pull request #4074 14 days later.
Fix verified by reporter 1 day later.
Log4j 2.25.4 released 3 days later.
Weakness Types
Incorrect Provision of Specified Functionality
The code does not function according to its published specifications, potentially leading to incorrect usage. When providing functionality to an external party, it is important that the software behaves in accordance with the details specified. When requirements of nuances are not documented, the functionality may produce unintended behaviors for the caller, possibly leading to an exploitable state.
Improper Output Neutralization for Logs
The software does not neutralize or incorrectly neutralizes output that is written to logs.
Products Associated with CVE-2026-34478
Want to know whenever a new CVE is published for Apache Log4j? stack.watch will email you.
Affected Versions
Apache Software Foundation Apache Log4j Core:- Version 2.21.0 and below 2.25.4 is affected.
- Version 3.0.0-beta1, <= 3.0.0-beta3 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.