CVE-2025-68161: TLS hostname verification bypass in Apache Log4j Core Socket Appender
- Vendor
- Apache Software Foundation
CVE-2025-68161 is a TLS hostname-verification vulnerability in the Socket Appender of Apache Log4j Core versions 2.0-beta9 through 2.25.2. The appender fails to verify that the peer certificate matches the intended log receiver's hostname, even when hostname verification is explicitly enabled through the verifyHostName configuration attribute or log4j2.sslVerifyHostName system property. An attacker able to intercept or redirect the connection and present a certificate issued by a trusted certificate authority can impersonate the log receiver and intercept or redirect log traffic. The initial fix in version 2.25.3 corrected the system-property configuration path but left the configuration-attribute path unresolved; that remaining issue is tracked as CVE-2026-34477.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can compromise the confidentiality and integrity of log communications by allowing a man-in-the-middle attacker to impersonate the intended TLS log receiver. Log data may be disclosed to an unauthorized recipient, and interception or redirection can undermine the integrity of downstream logging. The vulnerability does not establish arbitrary code execution or a direct availability impact.
Mitigation
If you can’t patch tonight, do this now.
Configure the Socket Appender to use a private or restricted trust root, limiting trusted certificate authorities to those necessary for the intended logging infrastructure. This reduces the set of certificates an attacker could use but does not correct hostname verification. Merely enabling hostname verification on affected versions is insufficient.
Remediation
Patch, then assume compromise.
Upgrade Apache Log4j Core to version 2.25.4 or later, or install the applicable vendor security update for products bundling the library. Version 2.25.3 introduced the fix for CVE-2025-68161 but corrected hostname verification only when enabled through the log4j2.sslVerifyHostName system property. Version 2.25.4 also corrects the remaining verifyHostName configuration-attribute issue tracked as CVE-2026-34477. Explicitly enable hostname verification in the corrected configuration.
Exploits
No validated public exploits yet. Hidden: 2 rejected by Mallory's analysis as not a working exploit.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2025-68161 exploited in the wild?
- As of Nov 20, 2026, Mallory has no reports of CVE-2025-68161 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-68161?
- Yes. As of Nov 20, 2026, Mallory has reports of a public exploit for CVE-2025-68161.
- Is there a patch for CVE-2025-68161?
- Upgrade Apache Log4j Core to version 2.25.4 or later, or install the applicable vendor security update for products bundling the library. Version 2.25.3 introduced the fix for CVE-2025-68161 but corrected hostname verification only when enabled through the log4j2.sslVerifyHostName system property.
- What products are affected by CVE-2025-68161?
- Apache Software Foundation Log4j.
- How severe is CVE-2025-68161?
- CVE-2025-68161 has a CVSS v4 score of 6.3 (Medium) and an EPSS score of 0.79% (53rd percentile) as of Nov 20, 2026.
Recent activity
65 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.