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

> Man-in-the-middle attackers can intercept or redirect log traffic due to missing TLS hostname verification in the Socket Appender.

- **Severity:** Medium 6.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Dec 2025
- **Updated:** 10 Apr 2026
- **Also known as:** CLEANSTART-2026-AT67837, CLEANSTART-2026-FS24569, CLEANSTART-2026-MW42084, CLEANSTART-2026-NM32016, CLSA-2026-1779842948, CLSA-2026-1781052749, CLSA-2026-1791900475, DEBIAN-CVE-2025-68161, DLA-4444-1, ECHO-6f17-219d-b8c8, GHSA-vc5p-v9hr-52mj, MINI-2443-w96w-fwhx, MINI-257v-rc7m-mjvh, MINI-3382-c7h2-5hj3, MINI-35jg-9338-87mm, MINI-3934-3w2w-6cfc, MINI-42jf-8j3j-qg86, MINI-46wc-cfgp-qqwf, MINI-47xf-88p9-rv37, MINI-4946-h5h9-rrx3, MINI-49wv-3prw-jvfp, MINI-4mwj-5vm9-23wp, MINI-55w5-2mgq-vq42, MINI-5c46-x8mj-v26p, MINI-5v59-79f7-5f98, MINI-62j8-pw3f-4h5m, MINI-6h82-99jm-7x84, MINI-775f-6qxw-3jr5, MINI-79r5-h9qh-mxqq, MINI-7jvf-xwhp-gr7r, MINI-83pg-p8xh-xjpr, MINI-877c-pvvh-p72v, MINI-89f3-gvcw-538f, MINI-8c3j-9894-wm98, MINI-8wr5-h6mw-pcpg, MINI-99hm-5rrh-9rq5, MINI-9m73-xq46-44jx, MINI-9mcj-8rvr-6fh8, MINI-9vmq-r48g-j67m, MINI-cj36-p2gf-8m9w, MINI-cxxx-q5jg-hxc8, MINI-fcrm-8prh-rhpf, MINI-fgjv-mp25-mr6j, MINI-fxc8-r6hh-w8cf, MINI-g325-hmrc-mmc6, MINI-g7wg-ppqv-4pf3, MINI-gc2f-f7jj-2xqj, MINI-gpf7-mq98-x554, MINI-gpgg-w882-vvv2, MINI-h4r6-3wrj-9v8g, MINI-h683-cv4m-8hw3, MINI-h9w4-vrr5-5h43, MINI-hg59-prjf-34wj, MINI-hpp3-9ccv-ff4x, MINI-hx2p-jh4v-hchf, MINI-j4c7-pj6m-mmh6, MINI-j4gp-xxxv-jpfm, MINI-j6cp-9chv-px8g, MINI-j85p-6447-mh3w, MINI-jqjp-rjq5-pjvq, MINI-jx37-v9r6-x3fm, MINI-m2vw-v877-66c9, MINI-m946-9q8h-c4vx, MINI-mxr8-4gvr-24rv, MINI-pg6m-v2mp-w444, MINI-pmxq-2cq4-qmj3, MINI-prw4-grpr-qhv3, MINI-q777-6gfg-cvx3, MINI-qx6m-rwrf-h6x7, MINI-r3x4-6h9f-gccq, MINI-r4h5-r9f2-2mvq, MINI-rg6p-3pc8-8fq6, MINI-rppv-x7qw-7v4w, MINI-v8vm-6p23-4776, MINI-vqgq-rc86-58hm, MINI-w4f3-mv92-p4xw, MINI-wmwg-wxpj-8jxw, MINI-wv48-3xr3-5f4g, MINI-xc5h-g92f-527h, MINI-xr6x-v28h-8fj5, ROOT-APP-MAVEN-CVE-2025-68161, SUSE-SU-2026:0254-1, UBUNTU-CVE-2025-68161, openSUSE-SU-2026:10009-1

## What is CVE-2025-68161?

CVE-2025-68161 is a medium-severity vulnerability in Apache Log4j Core, published on 18 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-295 (Improper Certificate Validation), CWE-297 (Improper Validation of Certificate with Host Mismatch)

## Which versions are affected by CVE-2025-68161?

2 open source packages ship an affected version, including org.apache.logging.log4j:log4j-core. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.logging.log4j:log4j-core` | Maven | From 2.0-beta9 | 2.25.3 |
| `org.apache.logging.log4j:log4j-core` | Maven | From 2.0-beta9 | 2.25.3 |
| `log4j` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 2.20.0-150200.4.30.1 |
| `log4j` | openSUSE:Leap 15.6 | All versions | 2.20.0-150200.4.30.1 |
| `log4j` | openSUSE:Tumbleweed | All versions | 2.20.0-1.1 |

Products: Apache Log4j.

## How do I fix CVE-2025-68161?

Upgrade org.apache.logging.log4j:log4j-core to 2.25.3 or later.

## Is CVE-2025-68161 being exploited?

There is no known exploitation of CVE-2025-68161 in the wild and no public exploit code.

## Other vulnerabilities in Apache Log4j Core

- [CVE-2021-44228](https://insights.sbomify.com/CVE-2021-44228/): Apache Log4j2 Remote Code Execution (critical 10.0, exploited in the wild)
- [CVE-2021-45046](https://insights.sbomify.com/CVE-2021-45046/): Apache Log4j2 Deserialization of Untrusted Data (critical 9.0, exploited in the wild)
- [CVE-2022-23305](https://insights.sbomify.com/CVE-2022-23305/): SQL injection in JDBC Appender in Apache Log4j V1 (critical 9.8)
- [CVE-2017-5645](https://insights.sbomify.com/CVE-2017-5645/): Deserialization of Untrusted Data in Log4j (critical 9.8)
- [CVE-2022-23302](https://insights.sbomify.com/CVE-2022-23302/): Deserialization of untrusted data in JMSSink in Apache Log4j 1.x (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-68161 and fix it if it is affected.

What it is: CVE-2025-68161 is a medium-severity vulnerability in Apache Log4j Core, published on 18 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-68161 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.logging.log4j:log4j-core (Maven): affected from 2.0-beta9; fixed in 2.25.3
- org.apache.logging.log4j:log4j-core (Maven): affected from 2.0-beta9; fixed in 2.25.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-68161/ (Markdown: https://insights.sbomify.com/CVE-2025-68161/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-68161
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-68161
- OSV: https://osv.dev/vulnerability/CVE-2025-68161

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-68161/
Summaries are generated and may contain mistakes; the official description above is the record.
