CVE-2026-129511: Apache log4net: Best-fit encoding in FileAppender lets fullwidth text forge XML log events
Improper Output Neutralization for Logs vulnerability in the FileAppender, RollingFileAppender, UdpAppender and SmtpAppender of Apache log4net.
Characters the configured encoding could not represent were converted by that encoding's best-fit fallback, which turns fullwidth characters such as U+FF1C, U+FF1E and U+FF02 into <, > and ". The conversion happened after XmlLayout or XmlLayoutSchemaLog4J had escaped the text, so a party whose data reaches a log message could forge complete log events in an XML log, for example a fake audit entry. On .NET Framework this needs no configuration where the ANSI code page is single-byte, since that is the default encoding; on .NET it needs a configured single-byte encoding such as ISO-8859-1. This is the best-fit conversion described by the WorstFit research.
This issue affects Apache log4net: from 1.2.9 before 3.6.0.
Users are recommended to upgrade to version 3.6.0, which fixes the issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.6.0
Event History
Frequently Asked Questions
Which deployments are affected by the encoding behavior?
The issue affects FileAppender, RollingFileAppender, UdpAppender, and SmtpAppender when producing XML logs through XmlLayout or XmlLayoutSchemaLog4J. On .NET Framework, the default encoding is affected when the ANSI code page is single-byte; on .NET, a single-byte encoding such as ISO-8859-1 must be explicitly configured.
What must an attacker be able to do to forge an XML log event?
An attacker needs to cause data they control to be included in a log message. They can use fullwidth characters that the configured encoding cannot represent, including U+FF1C, U+FF1E, and U+FF02, which may be converted to XML-significant characters after layout escaping.
What is the impact of successful exploitation?
An attacker can forge complete events in an XML log, such as inserting a fake audit entry. The provided severity vector indicates integrity impact only; it does not indicate confidentiality or availability impact.
What versions need remediation?
Apache log4net versions from 1.2.9 before 3.6.0 are affected. Upgrade to version 3.6.0, which fixes the issue.