CVE-2026-34477: CWE-297 Improper Validation of Certificate with Host Mismatch in Apache Software Foundation Apache Log4j Core
CVE-2026-34477 is a vulnerability in Apache Log4j Core affecting versions from 2.12.0 through 2.25.3. It involves improper validation of TLS certificates when hostname verification is configured via the <Ssl> element's verifyHostName attribute, which was silently ignored in these versions. This flaw allows a network attacker to potentially perform man-in-the-middle attacks if certain conditions are met, such as using SMTP, Socket, or Syslog appenders with TLS configured and the attacker presenting a trusted certificate. The issue does not affect the HTTP appender, which verifies hostnames correctly. Users are advised to upgrade to version 2.25.
AI Analysis
Technical Summary
The vulnerability arises because the verifyHostName attribute in the <Ssl> element of Apache Log4j Core was introduced in version 2.12.0 but ignored up to version 2.25.3, leaving TLS connections vulnerable to interception despite configuration. This incomplete fix follows an earlier CVE-2025-68161 that addressed hostname verification only when enabled via the log4j2.sslVerifyHostName system property. The flaw affects SMTP, Socket, and Syslog appenders using TLS with nested <Ssl> configuration. An attacker capable of presenting a certificate trusted by the appender's trust store can exploit this to perform man-in-the-middle attacks. The HTTP appender is unaffected as it uses a separate, correctly functioning verifyHostname attribute. The vendor recommends upgrading to Log4j Core 2.25.4 to resolve the issue.
Potential Impact
This vulnerability allows a network-based attacker to potentially intercept and manipulate TLS connections established by affected Log4j Core appenders (SMTP, Socket, Syslog) if the attacker can present a trusted certificate. This undermines the confidentiality and integrity of data transmitted over these connections. The HTTP appender is not impacted. There are no known exploits in the wild at this time.
Mitigation Recommendations
Users should upgrade to Apache Log4j Core version 2.25.4, which corrects the improper hostname verification issue. No other mitigations are specified or required as the fix is available. Patch status is confirmed by the vendor advisory recommending this upgrade.
CVE-2026-34477: CWE-297 Improper Validation of Certificate with Host Mismatch in Apache Software Foundation Apache Log4j Core
Description
CVE-2026-34477 is a vulnerability in Apache Log4j Core affecting versions from 2.12.0 through 2.25.3. It involves improper validation of TLS certificates when hostname verification is configured via the <Ssl> element's verifyHostName attribute, which was silently ignored in these versions. This flaw allows a network attacker to potentially perform man-in-the-middle attacks if certain conditions are met, such as using SMTP, Socket, or Syslog appenders with TLS configured and the attacker presenting a trusted certificate. The issue does not affect the HTTP appender, which verifies hostnames correctly. Users are advised to upgrade to version 2.25.
CVSS v4.0
Score 6.3medium
Affected software
pkg:maven/org.apache.logging.log4j/log4j-coreRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises because the verifyHostName attribute in the <Ssl> element of Apache Log4j Core was introduced in version 2.12.0 but ignored up to version 2.25.3, leaving TLS connections vulnerable to interception despite configuration. This incomplete fix follows an earlier CVE-2025-68161 that addressed hostname verification only when enabled via the log4j2.sslVerifyHostName system property. The flaw affects SMTP, Socket, and Syslog appenders using TLS with nested <Ssl> configuration. An attacker capable of presenting a certificate trusted by the appender's trust store can exploit this to perform man-in-the-middle attacks. The HTTP appender is unaffected as it uses a separate, correctly functioning verifyHostname attribute. The vendor recommends upgrading to Log4j Core 2.25.4 to resolve the issue.
Potential Impact
This vulnerability allows a network-based attacker to potentially intercept and manipulate TLS connections established by affected Log4j Core appenders (SMTP, Socket, Syslog) if the attacker can present a trusted certificate. This undermines the confidentiality and integrity of data transmitted over these connections. The HTTP appender is not impacted. There are no known exploits in the wild at this time.
Mitigation Recommendations
Users should upgrade to Apache Log4j Core version 2.25.4, which corrects the improper hostname verification issue. No other mitigations are specified or required as the fix is available. Patch status is confirmed by the vendor advisory recommending this upgrade.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- apache
- Date Reserved
- 2026-03-28T11:26:04.052Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69d91fde1cc7ad14dacba274
Added to database: 04/10/2026, 16:05:50 UTC
Last enriched: 05/28/2026, 21:21:53 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 529
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.