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: 01/21/2026, 02:07:21 UTC

Technical Analysis

CVE-2025-68161 is a vulnerability in the Apache Log4j Core component, specifically within the Socket Appender feature that facilitates network logging. The vulnerability stems from improper validation of TLS certificates, where the Socket Appender fails to perform hostname verification on the peer's certificate, even if the verifyHostName attribute or the log4j2.sslVerifyHostName system property is enabled. This means that during TLS handshake, the client does not confirm that the certificate's hostname matches the intended server, violating the standard TLS security model. Consequently, a man-in-the-middle attacker capable of intercepting or redirecting traffic between the logging client and server can present a certificate issued by a trusted CA (either from the default Java trust store or a configured trust store) and successfully impersonate the logging server. This allows the attacker to intercept, read, or modify log data in transit, potentially exposing sensitive information or corrupting logs used for auditing and incident response. The vulnerability affects all Apache Log4j Core versions from 2.0-beta9 up to 2.25.2, including the 3.0.0-alpha1 release. The CVSS 4.0 base score is 6.3 (medium severity), reflecting network attack vector, high attack complexity, no privileges or user interaction required, and limited confidentiality impact. No known exploits are reported in the wild as of publication. The recommended remediation is to upgrade to version 2.25.3, which corrects the hostname verification logic. Alternatively, configuring the Socket Appender to use a restricted or private trust root can limit exposure by reducing the set of trusted certificates, thereby mitigating the risk of a trusted malicious certificate being accepted.

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; interception or tampering could facilitate further attacks, evade detection, or violate data protection regulations such as GDPR. Organizations with distributed logging architectures or cloud-based log receivers are particularly vulnerable if network traffic is not adequately segregated or encrypted with proper certificate validation. The inability to verify hostnames undermines TLS protections, increasing the risk of man-in-the-middle attacks, especially in environments where attackers can access internal networks or compromise trusted certificate authorities. This vulnerability may also impact compliance and audit processes relying on log integrity. While the attack complexity is high, the absence of required authentication or user interaction means that once network access is gained, exploitation is feasible. The medium severity rating reflects these factors, but the potential impact on critical infrastructure, financial institutions, and government agencies in Europe could be significant if exploited.

Mitigation Recommendations

European organizations should immediately upgrade all Apache Log4j Core instances using the Socket Appender to version 2.25.3 or later to ensure proper hostname verification is enforced. Where immediate upgrade is not feasible, organizations should configure the Socket Appender to use a private or restricted trust store containing only trusted certificate authorities to limit acceptance of malicious certificates. Network segmentation and strict firewall rules should be applied to restrict access to logging endpoints, minimizing the attack surface for man-in-the-middle attacks. Employing network-level encryption and monitoring for anomalous TLS certificates or unexpected certificate chains can help detect potential interception attempts. Additionally, organizations should audit their logging configurations to identify usage of the Socket Appender and verify that verifyHostName settings are correctly applied. Regular vulnerability scanning and penetration testing focused on logging infrastructure can identify residual risks. Finally, organizations should review and enhance incident response plans to address potential log tampering scenarios.

Need more detailed analysis?Upgrade to Pro Console

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: 1/21/2026, 2:07:21 AM

Last updated: 2/7/2026, 4:06:25 PM

Views: 1666

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 more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats