Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-105243 Overview
CVE-2026-105243 is an Insufficient Logging vulnerability [CWE-778] affecting the EventLogAppender component of Apache log4net on Windows. The appender truncated long messages to a fixed size of 31837 characters, which exceeds the actual Windows Event Log record budget once the log name, source, and machine name are counted. When a message crossed the real ceiling, the event log service silently stored nothing and reported nothing. An attacker able to influence log content can suppress entire log records by submitting data long enough to breach the limit. The flaw affects Apache log4net versions 1.2.9 through 3.4.x, and only Windows applications using EventLogAppender are impacted.
Critical Impact
Attackers who control any portion of a logged message can suppress complete audit records on Windows, defeating forensic logging without triggering any error signal.
Affected Products
- Apache log4net versions 1.2.9 through 3.4.x (prior to 3.5.0)
- Windows applications using the EventLogAppender component
- .NET applications with long assembly names acting as the default applicationName
Discovery Timeline
- 2026-10-06 - CVE-2026-105243 published to the National Vulnerability Database (NVD)
- 2026-10-07 - Disclosure posted to the OpenWall OSS Security mailing list
- 2026-10-07 - Last updated in NVD database
Technical Details for CVE-2026-105243
Vulnerability Analysis
The EventLogAppender in Apache log4net writes log entries to the Windows Event Log through the native service. The appender enforced a hardcoded truncation limit of 31837 characters on rendered messages. This value was chosen as a conservative estimate for the maximum message length supported by the Event Log service.
The real constraint imposed by Windows is a whole-record budget, not a message-only limit. The record budget is consumed by the message, the log name, the source (applicationName), and the machine name. On Windows 11 build 26200, the service stores a record only while message + logName + applicationName stays within 31736 characters. One character beyond that threshold causes the service to drop the record silently.
Because applicationName defaults to the application domain name, consumers with long assembly names lost more budget and reached the ceiling faster. The result is a logging failure mode in which attacker-influenced data can erase audit evidence without producing any error output.
Root Cause
The root cause is a static assumption about the Windows Event Log size limit. The appender hardcoded a message cap that did not account for the overhead of other record fields. Insufficient logging [CWE-778] results because the service rejects oversized records without feedback, and log4net had no mechanism to detect or report the loss.
Attack Vector
Any party whose data flows into a log message can trigger suppression. Common vectors include HTTP request fields, user-supplied form data, API payloads, and parsed file contents reflected into log output through layout patterns. The attacker crafts input that, combined with the log name and source, exceeds the real Event Log budget. The target application calls into EventLogAppender, the Windows service rejects the record, and the event vanishes without diagnostic output.
// Patch excerpt - src/log4net/Appender/EventLogAppender.cs
// Write to the event log
try
{
- string eventTxt = PrepareEventText(RenderLoggingEvent(loggingEvent), _maxEventlogMessageSize);
+ string escaped = NativeStringEscape.EscapeNulCharacters(RenderLoggingEvent(loggingEvent));
+ int maxSize = GetMaxMessageSize();
+ string eventTxt = PrepareEventText(escaped, maxSize);
+ if (eventTxt.Length < escaped.Length)
+ {
+ // The only signal there is: the service reports neither a truncated nor a dropped record.
+ ErrorHandler.Error(
+ $"Truncated a logging event from {escaped.Length} to {maxSize} characters for log [{LogName}] "
+ + $"using source [{ApplicationName}]. What the layout rendered after that is not in the record.");
+ }
EventLogEntryType entryType = GetEntryType(loggingEvent.Level);
Source: Apache log4net commit 28fbfb25. The patch replaces the fixed _maxEventlogMessageSize constant with a computed GetMaxMessageSize() value and raises an ErrorHandler.Error notification when truncation occurs.
Detection Methods for CVE-2026-105243
Indicators of Compromise
- Gaps in Windows Event Log sequences for application sources that use log4net EventLogAppender
- Application telemetry showing log-emission calls without corresponding Event Log entries
- User-supplied input fields exceeding roughly 31,000 characters in HTTP requests, headers, or API payloads
- Missing audit entries for events that other correlated systems recorded
Detection Strategies
- Inventory .NET applications on Windows for references to log4net versions 1.2.9 through 3.4.x and the EventLogAppender type.
- Compare application-level log counts with Windows Event Log record counts over the same interval to detect silent drops.
- Scan web and API logs for abnormally long input fields that could reach the Event Log record ceiling.
Monitoring Recommendations
- Forward Windows Event Log data and application logs to a centralized SIEM for correlation and gap analysis.
- Alert on sudden drops in event volume from sources backed by EventLogAppender.
- After upgrading to 3.5.0, monitor log4net internal error output for the new truncation message that includes LogName and ApplicationName.
How to Mitigate CVE-2026-105243
Immediate Actions Required
- Upgrade Apache log4net to version 3.5.0 or later across all Windows applications using EventLogAppender.
- Enumerate production and build pipelines for pinned log4net package references and update dependency manifests.
- Review log layout patterns to limit uncontrolled reflection of user-supplied data into Event Log messages.
Patch Information
The fix is delivered in Apache log4net 3.5.0 through Pull Request #315 and committed in commit 28fbfb25. The patch computes the real Event Log record budget at runtime and reports truncation through the configured error handler. Additional context is available in the Apache mailing list thread and the OpenWall OSS Security advisory.
Workarounds
- Switch affected applications to a different appender such as RollingFileAppender or a syslog-based appender until upgrade is possible.
- Enforce input length limits at the application boundary to prevent user-supplied data from approaching the Event Log record ceiling.
- Shorten the configured ApplicationName and LogName values to preserve more budget for message content.
# Update log4net via NuGet to the fixed release
dotnet add package log4net --version 3.5.0
# Or update the PackageReference entry in the .csproj
# <PackageReference Include="log4net" Version="3.5.0" />
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

