CVE-2025-68161: Apache Log4j Core: Missing TLS hostname verification in Socket appender

Published Dec 18, 2025
·
Updated

The fix for CVE-2025-68161

Other sources

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 configuration attribute or the 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.

GitHub

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.

NVD

Affected Software

15 affected componentsFixes available
Apache Log4j Core>=2.0-beta9<2.25.2
maven/org.apache.logging.log4j:log4j-core>=2.0-beta9<2.25.3
2.25.3
Microsoft azl3 javapackages-bootstrap 1.14.0-3
Apache Log4j>=2.0.1<2.25.3
Apache Log4j=2.0
Apache Log4j=2.0-beta9
Apache Log4j=2.0-rc1
Apache Log4j=2.0-rc1-rc1
Apache Log4j=2.0-rc2
IBM Datacap<=9.1.7
IBM Datacap<=9.1.8
IBM Datacap<=9.1.9
IBM Datacap Navigator<=9.1.7
IBM Datacap Navigator<=9.1.8
IBM Datacap Navigator<=9.1.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.apache.logging.log4j:log4j-core to a version that resolves this vulnerability.

    Fixed in 2.25.3
  2. Configuration

    Configure the Socket Appender to use a private or restricted trust root (i.e., point its trust store to a private/restricted CA bundle) to limit the set of trusted certificates.

    Apache Log4j Core Socket Appender trust root (trust store) = private or restricted trust root

Event History

Dec 18, 2025
CVE Published
via MITRE·08:47 PM
Data Sourced
via MITRE·08:47 PM
DescriptionWeakness
Data Sourced
via NVD·09:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 PM
RemedyAffected Software
Advisory Published
via GitHub·09:31 PM
Data Sourced
via GitHub·09:31 PM
DescriptionWeaknessAffected Software
Dec 21, 2025
Data Sourced
via Microsoft·01:02 AM
DescriptionSeverityWeaknessAffected Software
Jun 16, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-68161?

CVE-2025-68161 is classified as a high-severity vulnerability due to the lack of TLS hostname verification in Apache Log4j Core.

2

What versions of Apache Log4j Core are affected by CVE-2025-68161?

CVE-2025-68161 affects Apache Log4j Core versions from 2.0-beta9 to 2.25.2.

3

How do I fix CVE-2025-68161?

To resolve CVE-2025-68161, upgrade Apache Log4j Core to a version higher than 2.25.2 where TLS hostname verification is implemented.

4

What impact does CVE-2025-68161 have on my application?

CVE-2025-68161 can potentially allow attackers to perform man-in-the-middle attacks due to the failure to verify the authenticity of the peer certificate.

5

Is CVE-2025-68161 relevant for all applications using Log4j?

CVE-2025-68161 is specifically relevant for applications using the Socket Appender feature in affected versions of Apache Log4j Core.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203