Is log4net 3.2 vulnerable?

NuGet · 1 release from 3.2.0 to 3.2.0 · latest log4net is 3.6.0 · checked 18 Nov 2026

Yes: 1 known advisory

Yes. log4net 3.2.0, the last 3.2 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.

Upgrade with:dotnet add package log4net --version 3.3.0

Is your project on an affected log4net?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several .NET apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Advisories affecting log4net 3.2.0

  • MediumCVE-2026-40021GHSA-4f7c-pmjv-c25w10 Apr 2026

    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.2?

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.