CVE-2026-129510

Description

A flaw was found in log4net. When generating XML-formatted logs, the application improperly detects delimiters used to close character data (CDATA) sections due to culture-sensitive string comparisons. An attacker who supplies input recorded in logs can provide text containing special Unicode characters around the delimiter, leaving the section unclosed. Consequently, downstream XML log parsers may treat subsequent log entries as part of the attacker's message or fail to parse the log entirely, allowing an attacker to conceal subsequent log events and tamper with audit trails.

Statement

Red Hat Product Security has determined that this vulnerability does not affect any currently supported Red Hat product. This assessment may evolve based on further analysis and discovery. For more information about this vulnerability and the products it affects, please see the linked references.

Mitigation

To mitigate this vulnerability, configure the application to use an alternative, non-XML logging layout such as PatternLayout instead of XmlLayout or XmlLayoutSchemaLog4J.

In the application's log4net configuration file, replace the affected layout element with an alternative layout:

xml
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>

Caveats:
Switching the log layout alters the log structure, which may break log parsing pipelines or monitoring systems expecting XML output.

Warning:
Applying this configuration change requires restarting the affected application or service for the new layout settings to take effect.

Understanding the Weakness (CWE)

Integrity,Confidentiality,Availability,Non-Repudiation

Technical Impact: Modify Application Data; Hide Activities; Execute Unauthorized Code or Commands

Interpretation of the log files may be hindered or misdirected if an attacker can supply data to the application that is subsequently logged verbatim. In the most benign case, an attacker may be able to insert false entries into the log file by providing the application with input that includes appropriate characters. Forged or otherwise corrupted log files can be used to cover an attacker's tracks, possibly by skewing statistics, or even to implicate another party in the commission of a malicious act. If the log file is processed automatically, the attacker can render the file unusable by corrupting the format of the file or injecting unexpected characters. An attacker may inject code or other commands into the log file and take advantage of a vulnerability in the log processing utility.

Frequently Asked Questions

Want to get errata notifications? Sign up here.