CVE-2025-68161Apache Log4j Core: Missing TLS hostname verification in Socket appender
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.
What to do
Fixed builds are available from Maven: see the table below for the fixed version per release.
Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | apache-log4j2 | Fix pending | UBUNTU-CVE-2025-68161 | |
| Ubuntu 26.04 | apache-log4j2 | Under investigation | UBUNTU-CVE-2025-68161 | |
| Ubuntu 25.10 | apache-log4j2 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2025-68161 | |
| Ubuntu 24.04 | apache-log4j2 | Under investigation | UBUNTU-CVE-2025-68161 | |
| Ubuntu 22.04 | apache-log4j2 | Under investigation | UBUNTU-CVE-2025-68161 | |
| Ubuntu 20.04 | apache-log4j2 | Fix pending | UBUNTU-CVE-2025-68161 | |
| Ubuntu 18.04 | apache-log4j2 | Fix pending | UBUNTU-CVE-2025-68161 | |
| Ubuntu 16.04 | apache-log4j2 | Fix pending | UBUNTU-CVE-2025-68161 | |
| Debian 14 | apache-log4j2 | Fix pending | DEBIAN-CVE-2025-68161 | |
| Debian 13 | apache-log4j2 | Fix pending | DEBIAN-CVE-2025-68161 | |
| Debian 12 | apache-log4j2 | Fix pending | DEBIAN-CVE-2025-68161 | |
| Red Hat Enterprise Linux 10 | log4j | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | log4j-bom | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | log4j-javadoc | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | log4j-jcl | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | log4j-slf4j | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | log4j-web | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | log4j | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | log4j-jcl | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | log4j-slf4j | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | pki-resteasy-client | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | pki-resteasy-core | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | pki-resteasy-jackson2-provider | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | pki-resteasy-servlet-initializer | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | resteasy | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | log4j | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | log4j-jcl | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | log4j-slf4j | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | log4j-web | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | log4j12 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | log4j12-javadoc | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | resteasy | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | resteasy-javadoc | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | log4j | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | log4j-javadoc | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | log4j-manual | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 6 | log4j | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 6 | log4j-javadoc | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 6 | log4j-manual | Fix pending Fix deferred | ||
| Maven library | org.apache.logging.log4j:log4j-core | Fixed | 2.25.3 | GHSA-vc5p-v9hr-52mj |
What the vendor says
As published in the CVE record by apache, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Apache Software Foundation Apache Log4j Core: affected: 2.0-beta9 to before 2.25.3, 3.0.0-alpha1 to 3.0.0-beta3; fixed in
2.25.3
Vendor advisories:
- https://github.com/apache/logging-log4j2/pull/4002 (patch)
- https://logging.apache.org/security.html#CVE-2025-68161 (vendor-advisory)
- https://logging.apache.org/cyclonedx/vdr.xml (vendor-advisory)
- https://lists.apache.org/thread/xr33kyxq3sl67lwb61ggvm1fzc8k7dvx (vendor-advisory)
References
- https://github.com/apache/logging-log4j2/pull/4002
- https://logging.apache.org/security.html#CVE-2025-68161
- https://logging.apache.org/cyclonedx/vdr.xml
- https://logging.apache.org/log4j/2.x/manual/systemproperties.html#log4j2.sslVerifyHostName
- https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostName
- https://lists.apache.org/thread/xr33kyxq3sl67lwb61ggvm1fzc8k7dvx
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.