Apache Log4j Core: verifyHostName attribute silently ignored in TLS configuration, allowing hostname verification bypass

Summary

CVECVE-2026-34477
StatePUBLISHED
Assignerapache
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-04-10 16:16:30 UTC
Updated2026-04-10 16:16:30 UTC
DescriptionThe fix for CVE-2025-68161 https://logging.apache.org/security.html#CVE-2025-68161 was incomplete: it addressed hostname verification only when enabled via the log4j2.sslVerifyHostName https://logging.apache.org/log4j/2.x/manual/systemproperties.html#log4j2.sslVerifyHostName system property, but not when configured through the verifyHostName https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostName attribute of the <Ssl> element. Although the verifyHostName configuration attribute was introduced in Log4j Core 2.12.0, it was silently ignored in all versions through 2.25.3, leaving TLS connections vulnerable to interception regardless of the configured value. A network-based attacker may be able to perform a man-in-the-middle attack when all of the following conditions are met: * An SMTP, Socket, or Syslog appender is in use. * TLS is configured via a nested <Ssl> element. * The attacker can present a certificate issued by a CA trusted by the appender's configured trust store, or by the default Java trust store if none is configured. This issue does not affect users of the HTTP appender, which uses a separate verifyHostname https://logging.apache.org/log4j/2.x/manual/appenders/network.html#HttpAppender-attr-verifyHostName attribute that was not subject to this bug and verifies host names by default. Users are advised to upgrade to Apache Log4j Core 2.25.4, which corrects this issue.

Risk And Classification

Primary CVSS: v4.0 6.3 MEDIUM from [email protected]

CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Problem Types: CWE-297 | CWE-297 CWE-297 Improper Validation of Certificate with Host Mismatch


VersionSourceTypeScoreSeverityVector
4.0[email protected]Secondary6.3MEDIUMCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:L/SA:N/E:X/C...
4.0CNACVSS6.3MEDIUMCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:L/SA:N

CVSS v4.0 Breakdown

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
None
Confidentiality
Low
Integrity
None
Availability
None
Sub Conf.
None
Sub Integrity
Low
Sub Availability
None

CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Apache Software Foundation Apache Log4j Core affected 2.12.0 2.25.4 maven Not specified
CNA Apache Software Foundation Apache Log4j Core affected 3.0.0-alpha1 3.0.0-beta3 maven Not specified

References

ReferenceSourceLinkTags
lists.apache.org/thread/lkx8cl46t2bvkcwfcb2pd43ygc097lq4 [email protected] lists.apache.org
github.com/apache/logging-log4j2/pull/4075 [email protected] github.com
logging.apache.org/security.html [email protected] logging.apache.org
logging.apache.org/cyclonedx/vdr.xml [email protected] logging.apache.org
logging.apache.org/log4j/2.x/manual/appenders/network.html [email protected] logging.apache.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Samuli Leinonen (original reporter) (en)

CNA: Naresh Kandula (independently) (en)

CNA: Vitaly Simonovich (independently) (en)

CNA: Raijuna (independently) (en)

CNA: Danish Siddiqui (djvirus, independently) (en)

CNA: Markus Magnuson (independently) (en)

CNA: Haruki Oyama (Waseda University, independently) (en)

Additional Advisory Data

SourceTimeEvent
CNA2025-12-20T19:05:00.000ZVulnerability reported by Samuli Leinonen
CNA2025-12-30T22:57:00.000ZCandidate patch shared internally by Piotr P. Karwasz
CNA2026-02-25T19:35:00.000ZIndependent report received from Naresh Kandula
CNA2026-03-01T23:01:00.000ZIndependent report received from Vitaly Simonovich
CNA2026-03-02T06:31:00.000ZIndependent report received from Raijuna
CNA2026-03-08T18:17:00.000ZIndependent report received from Danish Siddiqui
CNA2026-03-19T09:46:00.000ZIndependent report received from Markus Magnuson
CNA2026-03-21T11:13:00.000ZIndependent report received from Haruki Oyama
CNA2026-03-24T19:46:00.000ZFix shared publicly by Piotr P. Karwasz as pull request #4075
CNA2026-03-28T11:19:00.000ZLog4j 2.25.4 released
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report