MediumGHSA-vc5p-v9hr-52mjCVE-2025-68161

Apache Log4j does not verify the TLS hostname in its Socket Appender

Published 18 Dec 2025 · Updated 10 Sept 2026

Is your project on an affected org.apache.logging.log4j:log4j-core?

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

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

Affected package

Affected
>=2.0-beta9 <2.25.3
Fixed in
2.25.3
Update to the fixed version for your release line, for example:mvn versions:use-dep-version -Dincludes=org.apache.logging.log4j:log4j-core -DdepVersion=2.25.3 -DforceVersion=true

Details

The Socket Appender in Apache Log4j Core versions 2.0-beta9 through 2.25.2 does not perform TLS hostname verification of the peer certificate, even when the verifyHostName configuration attribute or the log4j2.sslVerifyHostName system property is set to true.

This issue may allow a man-in-the-middle attacker to intercept or redirect log traffic under the following conditions:

  • The attacker is able to intercept or redirect network traffic between the client and the log receiver.
  • The attacker can present a server certificate issued by a certification authority trusted by the Socket Appender’s configured trust store (or by the default Java trust store if no custom trust store is configured).

Users are advised to upgrade to Apache Log4j Core version 2.25.3, which addresses this issue.

As an alternative mitigation, the Socket Appender may be configured to use a private or restricted trust root to limit the set of trusted certificates.

Is GHSA-vc5p-v9hr-52mj in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected org.apache.logging.log4j:log4j-core, and gives you the command that fixes it.

More advisories for org.apache.logging.log4j:log4j-core

  • MediumCVE-2026-34479Apache Log4j 1 to Log4j 2 bridge: silent log event loss in Log4j1XmlLayout due to unescaped XML 1.0 forbidden characters · 10 Apr 2026
  • MediumCVE-2026-34480Apache Log4j Core: Silent log event loss in XmlLayout due to unescaped XML 1.0 forbidden characters · 10 Apr 2026
  • MediumCVE-2026-34478Apache Log4j Core: log injection in `Rfc5424Layout` due to silent configuration incompatibility · 10 Apr 2026
  • MediumCVE-2026-34477Apache Log4j Core: `verifyHostName` attribute silently ignored in TLS configuration · 10 Apr 2026
  • HighCVE-2023-26464Apache Log4j 1.x (EOL) allows Denial of Service (DoS) · 10 Mar 2023
  • MediumCVE-2021-44832Improper Input Validation and Injection in Apache Log4j2 · 4 Jan 2022
All 12 advisories for org.apache.logging.log4j:log4j-core

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.