Is log4net 3.1 vulnerable?
NuGet · 1 release from 3.1.0 to 3.1.0 · latest log4net is 3.6.0 · checked 18 Nov 2026
Yes: 1 known advisory
Yes. log4net 3.1.0, the last 3.1 release, is affected by 1 known security advisory (1 medium), including CVE-2026-40021. Upgrade to 3.3.0 or later to fix all of them.
dotnet add package log4net --version 3.3.0Is your project on an affected log4net?
Look after several .NET apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Advisories affecting log4net 3.1.0
Apache Log4net: Silent log event loss in XmlLayout and XmlLayoutSchemaLog4J due to unescaped XML 1.0 forbidden characters
- Affected
- <3.3.0
- Fixed in
- 3.3.0
Which of your client projects are still on log4net 3.1?
NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact log4net version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.
Other log4net versions
Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the NuGet registry. Refreshed daily.