CVE-2025-68161 — Vulnerability in log4j-core — CVE Details
Apache Log4j does not verify the TLS hostname in its Socket Appender
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.79%). Schedule for your next planned update.
Does your project use an affected org.apache.logging.log4j:log4j-core version?
Paste your pom.xml to check it for CVE-2025-68161 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published December 18, 2025 (343 days ago).
- Last revised September 10, 2026 — 265 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
<!-- Update pom.xml dependency version to 2.25.3 for org.apache.logging.log4j:log4j-core -->
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Maven (1).
| Package | Fixed In |
|---|---|
| org.apache.logging.log4j:log4j-core Maven · Affected: 2.0, 2.0-beta9, 2.0-rc1, 2.0-rc2 (+55 more) | 2.25.3 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-297
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 4.0 score means for each attack dimension.
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
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-68161ADVISORY
- https://github.com/apache/logging-log4j2/pull/4002WEB
- https://github.com/apache/logging-log4j2/commit/3b93748497e1adbbd027fda8a5e7268ec5d0d578WEB
- https://github.com/apache/logging-log4j2WEB
- https://lists.apache.org/thread/xr33kyxq3sl67lwb61ggvm1fzc8k7dvxWEB
- https://logging.apache.org/cyclonedx/vdr.xmlWEB
- https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostNameWEB
- https://logging.apache.org/log4j/2.x/manual/systemproperties.html#log4j2.sslVerifyHostNameWEB
- https://logging.apache.org/security.html#CVE-2025-68161WEB
- https://www.openwall.com/lists/oss-security/2025/12/18/1WEB
Frequently Asked Questions
- What is CVE-2025-68161?
- Apache Log4j does not verify the TLS hostname in its Socket Appender. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 4.0/10).
- How do I check if my project is affected by CVE-2025-68161?
- CVE-2025-68161 affects org.apache.logging.log4j:log4j-core. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-68161 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is an above-median EPSS score — 52.9% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2021-45046CRITICAL
Incomplete fix for Apache Log4j vulnerability
- CVE-2021-44228CRITICAL
Remote code injection in Log4j
- CVE-2021-45105HIGH
Apache Log4j2 vulnerable to Improper Input Validation and Uncontrolled Recursion
- CVE-2026-34480MEDIUM
Apache Log4j Core: Silent log event loss in XmlLayout due to unescaped XML 1.0 forbidden characters
- CVE-2026-34477MEDIUM
Apache Log4j Core: `verifyHostName` attribute silently ignored in TLS configuration
- CVE-2021-44832MEDIUM
Improper Input Validation and Injection in Apache Log4j2
- CVE-2026-34479MEDIUM
Apache Log4j 1 to Log4j 2 bridge: silent log event loss in Log4j1XmlLayout due to unescaped XML 1.0 forbidden characters
- CVE-2026-19032MEDIUM
jackson-databind: Path Deserialization Missing Scheme Allowlist for FileSystemProvider Resolution