CVE-2025-68161: CWE-297 Improper Validation of Certificate with Host Mismatch in Apache Software Foundation Apache Log4j Core
Apache Log4j Core versions 2.0-beta9 through 2.25.2 contain a vulnerability in the Socket Appender where TLS hostname verification is not properly performed, even if configured to do so. This flaw can allow a man-in-the-middle attacker to intercept or redirect log traffic if they can present a trusted certificate and intercept network traffic. The issue is addressed in version 2.25.3. Users can alternatively mitigate by restricting the trust root to limit trusted certificates.
AI Analysis
Technical Summary
The Socket Appender in Apache Log4j Core versions 2.0-beta9 through 2.25.2 fails to perform TLS hostname verification of the peer certificate despite the verifyHostName configuration attribute or log4j2.sslVerifyHostName system property being set to true. This improper validation (CWE-297) can enable man-in-the-middle attacks where an attacker intercepts or redirects log traffic by presenting a certificate trusted by the configured trust store. The vulnerability has a CVSS 4.0 base score of 6.3 (medium severity). Apache has released version 2.25.3 to fix this issue. As an alternative, users may configure the Socket Appender to use a private or restricted trust root to limit trusted certificates.
Potential Impact
An attacker capable of intercepting or redirecting network traffic between the client and log receiver can exploit this vulnerability to intercept or redirect log data by presenting a trusted certificate, potentially compromising the confidentiality and integrity of log transmissions. This could affect monitoring and forensic capabilities relying on log data integrity.
Mitigation Recommendations
Upgrade Apache Log4j Core to version 2.25.3, which contains the official fix for this vulnerability. Alternatively, configure the Socket Appender to use a private or restricted trust root to limit the set of trusted certificates. Patch status is confirmed by the vendor advisory. No other mitigations are indicated.
CVE-2025-68161: CWE-297 Improper Validation of Certificate with Host Mismatch in Apache Software Foundation Apache Log4j Core
Description
Apache Log4j Core versions 2.0-beta9 through 2.25.2 contain a vulnerability in the Socket Appender where TLS hostname verification is not properly performed, even if configured to do so. This flaw can allow a man-in-the-middle attacker to intercept or redirect log traffic if they can present a trusted certificate and intercept network traffic. The issue is addressed in version 2.25.3. Users can alternatively mitigate by restricting the trust root to limit trusted certificates.
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 Socket Appender in Apache Log4j Core versions 2.0-beta9 through 2.25.2 fails to perform TLS hostname verification of the peer certificate despite the verifyHostName configuration attribute or log4j2.sslVerifyHostName system property being set to true. This improper validation (CWE-297) can enable man-in-the-middle attacks where an attacker intercepts or redirects log traffic by presenting a certificate trusted by the configured trust store. The vulnerability has a CVSS 4.0 base score of 6.3 (medium severity). Apache has released version 2.25.3 to fix this issue. As an alternative, users may configure the Socket Appender to use a private or restricted trust root to limit trusted certificates.
Potential Impact
An attacker capable of intercepting or redirecting network traffic between the client and log receiver can exploit this vulnerability to intercept or redirect log data by presenting a trusted certificate, potentially compromising the confidentiality and integrity of log transmissions. This could affect monitoring and forensic capabilities relying on log data integrity.
Mitigation Recommendations
Upgrade Apache Log4j Core to version 2.25.3, which contains the official fix for this vulnerability. Alternatively, configure the Socket Appender to use a private or restricted trust root to limit the set of trusted certificates. Patch status is confirmed by the vendor advisory. No other mitigations are indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- apache
- Date Reserved
- 2025-12-16T11:30:53.875Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69446a7c4eb3efac36a96175
Added to database: 12/18/2025, 20:56:28 UTC
Last enriched: 05/28/2026, 21:24:10 UTC
Last updated: 09/10/2026, 19:36:51 UTC
Views: 4574
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.