Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-68161: CWE-297 Improper Validation of Certificate with Host Mismatch in Apache Software Foundation Apache Log4j Core

0
Medium
VulnerabilityCVE-2025-68161cvecve-2025-68161cwe-297
Published: Thu Dec 18 2025 (12/18/2025, 20:47:49 UTC)
Source: CVE Database V5
Vendor/Project: Apache Software Foundation
Product: Apache Log4j Core

Description

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 https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostName configuration attribute or the log4j2.sslVerifyHostName https://logging.apache.org/log4j/2.x/manual/systemproperties.html#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.

AI-Powered Analysis

AILast updated: 12/18/2025, 21:12:55 UTC

Technical Analysis

CVE-2025-68161 identifies a security vulnerability in the Apache Log4j Core library, specifically in the Socket Appender component versions 2.0-beta9 through 2.25.2. The vulnerability arises because the Socket Appender does not properly validate the hostname in the TLS certificate presented by the log receiver during encrypted communication, even when the verifyHostName configuration attribute or the log4j2.sslVerifyHostName system property is enabled. This improper validation (CWE-297) means that the client accepts any certificate signed by a trusted certificate authority without verifying that the certificate’s hostname matches the intended server. Consequently, an attacker capable of intercepting or redirecting network traffic between the logging client and server can present a valid certificate issued by a trusted CA, enabling a man-in-the-middle (MITM) attack. This attack can lead to interception or redirection of log data, potentially exposing sensitive information contained in logs or allowing attackers to manipulate logging streams. The vulnerability does not require authentication or user interaction but has a high attack complexity because the attacker must control network traffic and possess a trusted certificate. The CVSS 4.0 score is 6.3 (medium severity), reflecting network attack vector, no privileges or user interaction needed, but high complexity and limited confidentiality impact. The recommended remediation is upgrading to Apache Log4j Core version 2.25.3, which fixes the hostname verification logic. Alternatively, configuring the Socket Appender to use a private or restricted trust root limits the set of trusted certificates, reducing exposure to MITM attacks.

Potential Impact

For European organizations, this vulnerability poses a risk to the confidentiality and integrity of log data transmitted over networks using Apache Log4j Core’s Socket Appender. Logs often contain sensitive operational, security, or personal data, and interception could lead to information disclosure or aid attackers in further exploitation. Critical sectors such as finance, healthcare, telecommunications, and government rely heavily on secure logging for auditing and incident response; compromise of log integrity undermines these functions. Additionally, attackers could redirect logs to malicious endpoints, disrupting monitoring and detection capabilities. The medium severity rating reflects that while exploitation is non-trivial, the potential impact on confidentiality and operational security is significant. Organizations with distributed architectures or cloud environments using Log4j for remote logging are particularly vulnerable. Failure to address this issue could result in regulatory compliance violations under GDPR or sector-specific regulations due to inadequate protection of sensitive data.

Mitigation Recommendations

1. Immediately upgrade all Apache Log4j Core instances to version 2.25.3 or later, which contains the fix for hostname verification in the Socket Appender. 2. Review and audit all logging configurations to identify use of the Socket Appender with TLS enabled. 3. If upgrading is not immediately feasible, configure the Socket Appender to use a private or restricted trust store containing only trusted certificates to limit exposure to MITM attacks. 4. Implement network segmentation and encryption controls to protect logging traffic from interception, such as VPNs or dedicated secure channels. 5. Monitor network traffic for unusual redirections or certificate anomalies related to logging endpoints. 6. Conduct regular security assessments of logging infrastructure and update security policies to include verification of logging transport security. 7. Educate DevOps and security teams about the importance of TLS hostname verification in logging components and ensure secure defaults in deployment pipelines.

Need more detailed analysis?Get Pro

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, 8:56:28 PM

Last enriched: 12/18/2025, 9:12:55 PM

Last updated: 12/19/2025, 12:51:21 PM

Views: 15

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats