Improper Handling of Unicode Encoding Affecting log4net package, versions [,3.5.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.82% (57th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DOTNET-LOG4NET-20552490
  • published7 Oct 2026
  • disclosed6 Oct 2026
  • creditUnknown

Introduced: 6 Oct 2026

NewCVE-2026-105241  (opens in a new tab)
CWE-176  (opens in a new tab)

How to fix?

Upgrade log4net to version 3.5.0 or higher.

Overview

Affected versions of this package are vulnerable to Improper Handling of Unicode Encoding in SmtpPickupDirAppender.SendBuffer(), which writes the rendered events through File.CreateText, whose encoder throws on content it cannot represent such as an unpaired UTF-16 surrogate, aborting the write partway. An attacker can suppress the records of other events, including ones they did not generate, by placing an unpaired surrogate in content that is logged, which abandons the whole buffered batch and leaves a truncated mail in the pickup directory for the service to send. This affects applications using SmtpPickupDirAppender, and requires the attacker to control data reaching a logged message.

CVSS Base Scores

version 4.0
version 3.1