CVE-2025-68161
Apache Log4j Core: Missing TLS hostname verification in Socket appender
Check your servers for CVE-2025-68161
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-68161 affects a package, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:L/SA:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Attack requirements
- none: an attack works without special conditions on the target
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Impact on the vulnerable system
- confidentiality low, integrity none, availability none: what an attacker can read, change or stop in the vulnerable component
- Impact on other systems
- confidentiality none, integrity low, availability none: what an attacker can read, change or stop beyond it
Exploitation
EPSS 0.80%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 57.6% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 18 Dec 2025):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-297 Improper Validation of Certificate with Host Mismatch
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
Apache Log4j Core
package
org.apache.logging.log4j:log4j-core |
affected from 2.0-beta9, before 2.25.3 affected from 3.0.0-alpha1 up to and including 3.0.0-beta3
Other versions: unaffected
|
Is my server affected?
Find the installed version of the package (replace PACKAGE with its name) and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i PACKAGE
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2025-68161 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2025-68161RHEL, Rocky, Alma, Fedora
rpm -q PACKAGE
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2025-68161Alpine
apk list --installed | grep -i PACKAGEWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-68161
trivy image --scanners vuln IMAGE | grep CVE-2025-68161
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://logging.apache.org/security.html#CVE-2025-68161 logging.apache.org · vendor advisory
- https://logging.apache.org/cyclonedx/vdr.xml logging.apache.org · vendor advisory
- https://lists.apache.org/thread/xr33kyxq3sl67lwb61ggvm1fzc8k7dvx lists.apache.org · vendor advisory
Patches and release notes
- https://github.com/apache/logging-log4j2/pull/4002 github.com · patch
Other references
- https://logging.apache.org/log4j/2.x/manual/systemproperties.html#log4j2.sslVerifyHostName logging.apache.org · related
- https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostName logging.apache.org · related
- http://www.openwall.com/lists/oss-security/2025/12/18/1 openwall.com
- https://lists.debian.org/debian-lts-announce/2026/01/msg00015.html lists.debian.org
Source: the record CVE-2025-68161 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse