CVE-2026-105241
Executive Summary
CVE-2026-105241 is an improper handling of Unicode encoding vulnerability (CWE-176) in the SmtpPickupDirAppender component of Apache log4net, affecting versions from 1.2.9 before 3.5.0. An attacker who can influence the content of a log message — such as an unpaired UTF-16 surrogate — can cause the mail file writer to throw an exception during batch processing, resulting in the discarding of every buffered event in the batch and potentially leaving a truncated mail file in the pickup directory. This allows a party with control over logged data to suppress the log records of other events, degrading log integrity and hampering incident detection and forensic auditing for applications that use this specific appender.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
Apache log4net is a widely used logging framework for the .NET platform, and the SmtpPickupDirAppender is a specialized appender that writes log events as SMTP-formatted mail files to a directory (the "pickup directory") for later delivery by a mail transfer agent. Unlike the standard SmtpAppender, which sends mail directly, this appender offloads delivery to an external MTA.
The vulnerability stems from improper handling of Unicode encoding within this appender. When log content contains characters that the mail file writer cannot encode — the NVD description specifically cites an unpaired UTF-16 surrogate as an example — the write operation throws an exception. Critically, the exception handling logic is flawed: rather than discarding only the single event carrying the problematic content, the appender discards every buffered event in the current batch. This means that a single malformed log entry acts as a denial-of-logging vector for all other events buffered alongside it.
The attack surface is limited to applications that explicitly configure SmtpPickupDirAppender. The vulnerability is network-reachable in the sense that the malicious content must originate from a data source that feeds into a log message — for example, user-supplied input, HTTP headers, or any external data that an application logs. The CVSS vector (AV:N/AC:L/PR:N/UI:N) reflects that no authentication, privileges, or user interaction are required to supply the triggering content, though the impact is confined to integrity (I:L) with no confidentiality or availability impact outside the logging subsystem itself.
The core issue is a classic batch-processing fault: a single poisoned element causes the entire batch to fail atomically. In logging systems, this is particularly dangerous because logs are the primary evidence trail for security monitoring, compliance auditing, and incident response. An attacker who can inject an unpaired surrogate into a log message effectively gains a limited but meaningful ability to blind logging for concurrent events. Additionally, a truncated mail file may remain in the pickup directory, which could cause downstream MTA errors or partial delivery of log data.
Exploitation Scenarios
Reconnaissance/Target Identification: An attacker identifies an application that uses Apache log4net with
SmtpPickupDirAppenderconfigured. This can be inferred from application behavior, error messages, or configuration files if exposed. The attacker must also identify an input vector that is logged by the application — such as HTTP parameters, headers, or user-controlled fields.Triggering the Flaw: The attacker submits input containing an unpaired UTF-16 surrogate character. In .NET, unpaired surrogates are invalid Unicode sequences that cannot be encoded to UTF-8 or other target encodings. When the application logs this input, the log4net appender attempts to write the mail file and throws an encoding exception. Because of the improper exception handling, the entire current batch of buffered log events is discarded, not just the event containing the malicious character.
Payload/Execution Method: No code execution is required. The "payload" is simply the malformed Unicode character embedded in otherwise normal input. The attacker may need to time the submission to coincide with a batch window to maximize the suppression of other events. For example, if an attacker is conducting other malicious activity that generates log entries, they could precede or interleave those activities with requests containing unpaired surrogates to suppress evidence of their actions.
Post-Exploitation Impact: The primary impact is the suppression of log records for events that share a batch with the poisoned entry. A truncated mail file may also be left in the pickup directory, potentially causing operational issues for the mail transfer agent or resulting in incomplete log delivery. The attacker does not gain access to data (no confidentiality impact) or cause a denial of service outside the logging pipeline (no availability impact on the application itself), but they can degrade the integrity of the audit trail. This could allow other malicious activities to go undetected if they are logged concurrently. The scope is limited to applications using the
SmtpPickupDirAppender; other log4net appenders are unaffected.
Impact Assessment
The CVSS v3.1 score is 5.3 (Medium), with a vector of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N. The attack is network-reachable (AV:N), requires low complexity (AC:L), needs no privileges (PR:N) and no user interaction (UI:N). The scope is unchanged (S:U), meaning the impact is confined to the vulnerable component. There is no confidentiality impact (C:N), a low integrity impact (I:L), and no availability impact (A:N).
From a business perspective, the vulnerability undermines the reliability of logging — a critical control for security monitoring, compliance (e.g., PCI DSS, HIPAA, SOX), and forensic investigations. Organizations that rely on SmtpPickupDirAppender to archive or email logs may find their audit trails incomplete or corrupted. The blast radius is limited to applications that use this specific appender; however, within those applications, any user who can influence log content can suppress other events. This could be exploited by an insider or external attacker to hide malicious activity, although the impact is constrained by the batch-processing nature of the flaw. There is no public evidence of exploit code or active exploitation, and CISA KEV does not list this CVE.
Detection Guidance
Sigma Rule
title: Apache log4net SmtpPickupDirAppender Unicode Encoding Exception
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects exceptions related to Unicode encoding failures in SmtpPickupDirAppender that may indicate log suppression attempts.
author: Threat Intelligence
date: 2026-01-01
logsource:
category: application
product: windows
detection:
selection:
EventID: 1
Image|endswith: '.exe'
CommandLine|contains: 'SmtpPickupDirAppender'
keywords:
- 'Unicode'
- 'surrogate'
- 'SmtpPickupDirAppender'
- 'Encoding'
condition: selection or keywords
falsepositives:
- Legitimate encoding errors from non-malicious input
level: medium
tags:
- attack.defense_evasion
- attack.t1562
YARA Rule
rule CVE_2026_105241_log4net_Unicode_Exception
{
meta:
description = "Detects log4net SmtpPickupDirAppender Unicode encoding exception strings in log files or memory"
author = "Threat Intelligence"
date = "2026-01-01"
reference = "CVE-2026-105241"
hash = "unknown"
strings:
$a = "SmtpPickupDirAppender" ascii wide nocase
$b = "Unpaired surrogate" ascii wide nocase
$c = "EncoderFallbackException" ascii wide nocase
$d = "Unable to translate Unicode character" ascii wide nocase
$e = "log4net" ascii wide nocase
condition:
uint16(0) == 0x5A4D and any of ($a, $b, $c, $d) and $e
}
Suricata IDS Rule
alert http any any -> any any (msg:"CVE-2026-105241 Apache log4net SmtpPickupDirAppender Unicode Suppression Attempt"; flow:to_server,established; content:"%ED%A0%80"; http_uri; nocase; reference:cve,2026-105241; classtype:attempted-dos; sid:10000001; rev:1;)
Note: The rule above attempts to match a UTF-16 surrogate encoded in a URL. However, because the vulnerability is triggered by content in log messages, network detection is only possible if the malicious input traverses the network to the target application. Detection at the application or host level is more reliable.
Elastic Detection
sequence by host.hostname with maxspan=5m
[process where process.name == "w3wp.exe" or process.name == "dotnet.exe" and event.action == "logging"]
[process where process.name == "w3wp.exe" or process.name == "dotnet.exe" and event.action == "logging" and process.args : "*SmtpPickupDirAppender*"]
Splunk SPL Query
index=app_logs sourcetype=log4net:*
| search "SmtpPickupDirAppender" AND ("unicode" OR "surrogate" OR "EncoderFallbackException")
| stats count by host, app, sourcetype
| where count > 0
Wazuh OSSEC Rule
<group name="apache,log4net,">
<rule id="100100" level="10">
<decoded_as>json</decoded_as>
<field name="message">SmtpPickupDirAppender</field>
<field name="message">Unicode</field>
<description>CVE-2026-105241: Potential log4net SmtpPickupDirAppender Unicode encoding exception - possible log suppression attempt</description>
<mitre>
<id>T1562</id>
</mitre>
</rule>
</group>
Mitigation & Patch Guidance
Patch confidence: 0/4 (UNPATCHED — no patch evidence from any tracked source).
Immediate Mitigations:
- If
SmtpPickupDirAppenderis not essential, disable it and use an alternative appender such asSmtpAppenderorFileAppenderthat may not be affected. - Implement input validation and sanitization to reject or strip unpaired UTF-16 surrogates before they reach logging calls.
- Monitor logs for
EncoderFallbackExceptionorSmtpPickupDirAppendererrors to detect exploitation attempts. - Consider isolating logging to a separate process or service that can be restarted without affecting the main application.
- If
Patch/Upgrade Steps:
- Upgrade Apache log4net to version 3.5.0 or later, which the vendor states fixes the issue.
- Verify the upgrade by checking the release notes and testing logging functionality with malformed Unicode input.
- Ensure that all dependencies and transitive uses of log4net are updated.
Long-term Hardening:
- Adopt a principle of least privilege for logging: ensure that log data sources cannot be controlled by untrusted parties without sanitization.
- Implement redundant logging mechanisms to cross-verify log integrity.
- Regularly review and update logging frameworks to the latest stable versions.
- Use structured logging with proper encoding validators to prevent malformed sequences from entering the logging pipeline.
References
- NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2026-105241
- Apache log4net Security Advisory: https://logging.apache.org/log4net/release-notes.html (check for CVE-2026-105241)
- CWE-176: Improper Handling of Unicode Encoding: https://cwe.mitre.org/data/definitions/176.html
- Apache log4net Downloads: https://logging.apache.org/log4net/download_log4net.cgi
- CVSS v3.1 Specification: https://www.first.org/cvss/v3.1/specification-document
No known threat actor campaigns or exploit-in-the-wild evidence are associated with this CVE at this time.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.