CVE-2026-105240: Apache log4net null byte handling in OutputDebugStringAppender

CVE-2026-105240 · Severity: medium · CVSS 5.3 · Published 2026-10-06

Apache log4net is a popular logging framework for .NET applications. A null byte character in log messages causes the debug output to be prematurely terminated, silently discarding exception details and other important logging data that appears after the null byte. This affects Windows applications using the OutputDebugStringAppender component.

Technologies: Apache Log4net. Vendors: Apache.

Quick answers

Is CVE-2026-105240 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-105240 being exploited in the wild.
How severe is CVE-2026-105240?
Medium severity, with a CVSS score of 5.3, published 6 October 2026.
Which products and versions are affected?
Apache Log4net 1.2.9 to 3.4.x.
Is there a fix for CVE-2026-105240?
Yes: fixed in Apache log4net 3.5.0. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-105240 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-105240?
Check whether you run Apache Log4net at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: Apache log4net 3.5.0

Technical details

The OutputDebugStringAppender on Windows uses OutputDebugStringW, which is null-terminated, so embedded NUL characters in logged content truncate the record and drop subsequent layout-rendered data including exceptions. This is an improper neutralization of null byte vulnerability affecting log4net versions 1.2.9 through 3.5.0 (exclusive). The issue is fixed by escaping NUL characters before passing them to the Windows API.

Affected products

  • Apache log4net 1.2.9 to 3.4.x

Timeline

  • 2026-10-06: disclosed
  • 2026-09-03: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.