CVE-2026-105241: Apache log4net: Unencodable content discards a whole SmtpPickupDirAppender batch
Improper Handling of Unicode Encoding vulnerability in the SmtpPickupDirAppender of Apache log4net.
Content that the mail file writer cannot encode, such as an unpaired UTF-16 surrogate, made the write throw. Every buffered event in the batch was discarded, not only the one carrying the content, and a truncated mail could be left in the pickup directory. A party whose data reaches a log message could suppress the records of other events. Only applications that use SmtpPickupDirAppender are affected.
This issue affects Apache log4net: from 1.2.9 before 3.5.0.
Users are recommended to upgrade to version 3.5.0, which fixes the issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Apache log4netto a version that resolves this vulnerability.Fixed in 3.5.0
Event History
Frequently Asked Questions
Which deployments are affected?
Only applications configured to use log4net's SmtpPickupDirAppender are affected. Versions from 1.2.9 before 3.5.0 are vulnerable.
What must an attacker be able to do to exploit this issue?
A party must be able to cause data containing content the mail-file writer cannot encode, such as an unpaired UTF-16 surrogate, to reach a log message. The malformed content can cause the write to fail and discard the entire buffered batch.
What is the operational impact of a failed batch?
Events other than the one carrying the problematic content can be suppressed because the whole buffered batch is discarded. A truncated mail file may also be left in the pickup directory.
What is the recommended remediation?
Upgrade Apache log4net to version 3.5.0, which fixes the issue.