Apache Log4j Core Rfc5424Layout Log Injection Vulnerability

Vulnerability

A log injection vulnerability has been identified in Apache Log4j Core's Rfc5424Layout, affecting versions 2.21.0 prior to 2.25.4. The vulnerability arises from undocumented renames of security-relevant configuration attributes, leading to CRLF injection via stream-based syslog services. Specifically, the newLineEscape attribute was renamed, disrupting newline escaping for TCP framing users, and the useTlsMessageFormat attribute was renamed, downgrading TLS users to unframed TCP without newline escaping. This issue does not impact users of the SyslogAppender, as its configuration attributes remain unchanged.

Impact

Exploitation of this vulnerability allows for log injection via CRLF sequences, creating a false log entry that could disrupt the integrity of log management systems and potentially obscure malicious activities.

Reproduction

To reproduce this vulnerability, configure an application to use Apache Log4j Core Rfc5424Layout version 2.21.0 prior to 2.25.4, and set up a stream-based syslog service over TCP framing (RFC 6587) or TLS framing (RFC 5425) without the appropriate newline escaping. This can be done by manually renaming the 'newLineEscape' and 'useTlsMessageFormat' attributes in the Rfc5424Layout configuration, or by using a version of Log4j that has not yet been updated to address this issue.

Remediation

Upgrade to Apache Log4j Core version 2.25.4, which restores the correct attribute names and functionality. After upgrading, verify that the Rfc5424Layout is properly configured for the intended syslog framing.

Added: Apr 10, 2026, 4:54 PM
Updated: Apr 10, 2026, 4:54 PM

Vulnerability Rating

Custom Algorithm
spread
7.8
impact
0.6
exploitability
5.3
remediation
7.7
relevance
5.6
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.