Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit input with embedded NUL byte
-
ExploitData rendered into OutputDebugStringAppender record
-
ExecutionOutputDebugStringW truncates at NUL
-
ImpactTrailing log fields and exception text silently dropped
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Metacharacter neutralization
|
| Exploitation Conditions | Exploitation requires ALL of the following concrete preconditions: (1) the application runs on Windows; (2) log4net is explicitly configured to use OutputDebugStringAppender (a non-default, niche appender that calls the Windows OutputDebugStringW API); and (3) the attacker can influence content that reaches a logged message and insert a NUL (U+0000) character into it. Limiting factors that reduce realistic risk: the issue does not affect non-Windows deployments or any other appender, impact is confined to log-record integrity (concealing trailing log content such as exception text) with no confidentiality, availability, or code-execution effect, and the vulnerable OutputDebugStringAppender configuration is uncommon in production. |
| Impact | This is a genuinely low-to-moderate real-world risk despite the CVSS:3.1 base score of 5.3 (MEDIUM). The vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N shows the only impact is a LOW integrity effect - there is no confidentiality (C:N) or availability (A:N) impact, no code execution, and no disclosure of system data. The 'integrity' impact is purely log-record integrity: an attacker who can inject a NUL byte into content that gets logged can truncate the debug record and silently hide everything the layout rendered after it (exception text, trailing fields), making this fundamentally a log-tampering / anti-forensics evasion issue rather than a system compromise. No EPSS score was provided in the input, there is no CISA KEV listing, and no public POC was supplied, so there is no public exploit identified at time of analysis - all exploitation signals point to low urgency. The AV:N (network) rating is defensible only insofar as the tainted NUL-bearing data typically arrives over the network, but exploitation is strictly gated by a non-default deployment: the application must run on Windows AND be configured with OutputDebugStringAppender, which is a narrow and uncommon configuration - this real-world precondition is not captured in the AV:N/AC:L/PR:N metrics and substantially lowers practical risk below what the 5.3 base score suggests. Treat as a low-priority defense-in-depth fix, prioritized only where log integrity for Windows debug output is security-relevant. |
| Exploit ScenarioDerived | An attacker supplies input containing a NUL byte into a field the application later logs (for example a username, header, or request parameter) on a Windows host whose log4net is configured with OutputDebugStringAppender. Because OutputDebugStringW treats the string as NUL-terminated, the debug record is cut off at the NUL and all following content - including any exception text or trailing audit fields - is silently dropped, letting the attacker conceal the remainder of the log entry. No public exploit code is available, and the attack produces no code execution or data disclosure, only suppression of log content. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 06, 2026
A NUL character (U+0000) embedded in content that reaches a log message causes Apache log4net's OutputDebugStringAppender to truncate the emitted debug record at that point, silently discarding everything the layout rendered afterwards, including exception text and trailing fields. Only Windows applications that explicitly configure the non-default OutputDebugStringAppender are affected, across log4net versions from 1.2.9 up to (but excluding) 3.5.0. Per the CVSS:3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N, score 5.3) the flaw is unauthenticated and remotely reachable where attacker-controlled data is logged, but it is limited to log-record integrity with no confidentiality, availability, or code-execution impact; no public exploit code has been identified at time of analysis and the issue is not in CISA KEV, so overall real-world risk is low-to-moderate.
RemediationAI
Upgrade to Apache log4net 3.5.0, which is the vendor-released fix for CVE-2026-105240: the patched build escapes NUL characters via the new shared NativeStringEscape helper before OutputDebugStringAppender calls the native OutputDebugStringW API, so the full rendered record, including exception text and trailing layout fields, is preserved. The changelog entry (issue 315) and the upstream fix are visible in commit 6046fe9d7f353b49fe995361c071ec2eea8f7ef6 and PR https://github.com/apache/logging-log4net/pull/315, with the Apache advisory at https://lists.apache.org/thread.html/gyw2d4ppy82t1vlpdknkfd1nmzp21z17. Because the vulnerability is confined to a single appender, the most direct compensating control, if an immediate upgrade is not possible, is to reconfigure affected Windows applications to stop using OutputDebugStringAppender and route those events to a different log4net appender (for example a file or event-log appender) whose sink is not NUL-terminated; the trade-off is that debug output consumed by DebugView or an attached debugger will no longer appear in that channel, and any downstream tooling parsing the debug stream must be repointed. A second, narrower option is to sanitize or reject U+0000 in all untrusted input that flows into logging calls at the application boundary; this requires touching every ingestion path, does not protect against future or overlooked sources, and can alter the fidelity of legitimately logged data, so it should be treated as temporary rather than a substitute for the 3.5.0 upgrade. Note that disabling the appender only removes the vulnerable sink; it does not address any other logging sinks, though none of those are affected by this specific CWE-158 issue.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-158, improper neutralization of a null byte. log4net's OutputDebugStringAppender renders a logging event through its configured layout and passes the resulting string to the native Windows OutputDebugStringW API, which accepts a NUL-terminated wide string. Because the rendered content is not trusted, an attacker who can insert a U+0000 into any field that flows into the message terminates the native string early, so the debugger or debug-output consumer (e.g. DebugView, an attached debugger, or a debug-log pipeline) never sees the remainder of the record. The underlying defect class is the same one already mitigated for LocalSyslogAppender, which marshals messages to libc via a null-terminated string; the fix refactors that logic into a shared internal helper, log4net.Appender.Internal.NativeStringEscape.EscapeNulCharacters, which replaces every '\0' with the visible two-character escape "\\0". The affected component is specifically the OutputDebugStringAppender, a niche appender that only functions on Windows where the native OutputDebugStringW symbol is available; it is not a default appender and is unrelated to non-Windows appenders or to other log4net sinks.
Know when Log4Net gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Attacker-influenced data can reach the log without privileges or interaction (AV:N/AC:L/PR:N/UI:N); only partial log-record integrity is affected (I:L), with no confidentiality or availability impact.
Primary rating from Vendor (apache).
CVSS VectorVendor: apache
Lifecycle Timeline
2DescriptionCVE.org
Improper Neutralization of Null Byte or NUL Character vulnerability in the OutputDebugStringAppender of Apache log4net.
A NUL character in logged content ended the debug output record at that point, so everything the layout rendered after it, including exception text and trailing fields, was silently lost. A party whose data reaches a log message could hide the rest of that record. Only applications on Windows that use OutputDebugStringAppender 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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Log-integrity tampering in the RemoteSyslogAppender of Apache log4net affects versions from 1.2.12 up to but not includi
Log-record suppression in the %aspnet-request pattern converter of Apache log4net lets an unauthenticated remote sender
Improper handling of Unicode encoding in Apache log4net's SmtpPickupDirAppender lets an attacker who can place unencodab
Log-record truncation in Apache log4net's EventLogAppender silently drops everything a layout renders after a NUL (\0) c
Silent suppression of Windows event-log records in Apache log4net's EventLogAppender lets a party that can influence log
EUVD-2026-93864
GHSA-q2xj-998m-58gf
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB