# CVE-2026-34477: Apache Log4j Core: `verifyHostName` attribute silently ignored in TLS configuration

> Attackers can perform man-in-the-middle attacks on Log4j TLS connections if the verifyHostName attribute is configured but ignored, bypassing hostname verification.

- **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:** 10 Apr 2026
- **Updated:** 10 Apr 2026
- **Also known as:** CLEANSTART-2026-IQ12503, CLEANSTART-2026-KO79876, CLEANSTART-2026-QJ40083, CLEANSTART-2026-VD23579, CLEANSTART-2026-YX55507, CLSA-2026-1779929356, CLSA-2026-1791819410, CLSA-2026-1791901346, ECHO-a45f-aad1-7c04, GHSA-6hg6-v5c8-fphq, MINI-22wx-cwc8-qc7h, MINI-27f7-p329-r266, MINI-2988-wxcf-mhfx, MINI-29rw-3f2p-2p5w, MINI-2cmx-8rvj-5x8w, MINI-2mg3-cvrg-554p, MINI-2p3h-hjxx-3hw7, MINI-37w4-458c-4hw5, MINI-3cg3-3gxh-wqmw, MINI-3gm6-mc5g-92qm, MINI-3pw2-r9qj-8c6v, MINI-3r2h-5cc5-3v95, MINI-3r5x-57m5-727m, MINI-4fcc-gqxx-9334, MINI-4m5f-v537-jcc7, MINI-4w35-2h9f-jfgh, MINI-576r-cvcv-xjrg, MINI-5jhg-7wqx-4mgr, MINI-62c7-p8v2-6rpq, MINI-638m-7wvr-8f4c, MINI-63wj-vqwm-2q75, MINI-6fm2-g323-987m, MINI-6jq4-g6xr-j28f, MINI-6p4g-4q8c-8pgf, MINI-6pq6-xv8j-fppf, MINI-72fv-r7cj-5mvh, MINI-72mg-8mr7-gw75, MINI-7672-v4mm-ppgx, MINI-7g5w-wjm5-wm5m, MINI-7v57-7gxh-3mhr, MINI-7wwq-v4gv-qrp6, MINI-899g-jq5x-48hq, MINI-8rgv-899p-72g4, MINI-8rx5-2g2r-2pc6, MINI-9446-8fgf-prv7, MINI-94hm-8w4m-2p2j, MINI-9688-523q-rfpr, MINI-973j-54m6-c824, MINI-99vh-g85p-g7vg, MINI-9jg3-83jp-32c9, MINI-9x53-frwm-36h9, MINI-c2ph-67v4-jqxh, MINI-c2v9-3f22-953m, MINI-c6xq-9vwm-p94c, MINI-c7qp-v98p-6cw9, MINI-cfcf-v8xv-9rrw, MINI-cg8m-m9hc-v2mp, MINI-cm99-5c2x-x4jj, MINI-cp4x-2g67-73gm, MINI-cp5q-hh26-h9qq, MINI-cx2w-gp7j-jg2w, MINI-f453-5rfg-x936, MINI-fww8-v72f-hx3v, MINI-gr2g-ccxp-cw68, MINI-gr73-gwc9-698q, MINI-jmh3-xcc4-66pc, MINI-jp96-whj7-fpcm, MINI-jv36-x666-qj79, MINI-jv6q-jpjm-6cpf, MINI-m39j-xxm5-g5m8, MINI-m87w-9xxc-2vm2, MINI-mhch-vfcm-jwvj, MINI-mq24-3x2p-xmmg, MINI-mq34-76vm-v93j, MINI-mqj5-q69q-mm85, MINI-mrfm-x857-hhqf, MINI-pf4j-833v-fr45, MINI-pf9x-2c42-4582, MINI-pp77-vw6x-fq92, MINI-pppw-6jrw-8wxr, MINI-q3q6-crwh-v2c4, MINI-q5cv-q3x4-3g2m, MINI-r483-qwc3-7c75, MINI-r4px-m992-f9v2, MINI-r8fm-7gqv-mj67, MINI-r8wr-hq3w-pmgr, MINI-v58g-p2j9-w3g7, MINI-v5cw-2p9h-9gqj, MINI-v698-6pmw-7xxm, MINI-v6q8-6wwv-hvv2, MINI-v8vp-37wx-fv23, MINI-vf8j-74h6-mr68, MINI-vfhv-5hr8-fxwp, MINI-vpxq-wchq-8h23, MINI-wj3v-5f62-x5mr, MINI-wjcg-4r53-qgg2, MINI-wmhq-m9g5-wcw2, MINI-wxwq-h648-pvr5, MINI-x64g-w7qc-3hf5, MINI-xhxw-366g-h8v5, ROOT-APP-MAVEN-CVE-2026-34477, UBUNTU-CVE-2026-34477

## What is CVE-2026-34477?

CVE-2026-34477 is a medium-severity vulnerability in Apache Log4j Core, published on 10 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The fix for  CVE-2025-68161 https://logging.apache.org/security.html#CVE-2025-68161  was incomplete: it addressed hostname verification only when enabled via the  log4j2.sslVerifyHostName https://logging.apache.org/log4j/2.x/manual/systemproperties.html#log4j2.sslVerifyHostName  system property, but not when configured through the  verifyHostName https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostName  attribute of the <Ssl> element.

Although the verifyHostName configuration attribute was introduced in Log4j Core 2.12.0, it was silently ignored in all versions through 2.25.3, leaving TLS connections vulnerable to interception regardless of the configured value.

A network-based attacker may be able to perform a man-in-the-middle attack when all of the following conditions are met:

  *  An SMTP, Socket, or Syslog appender is in use.
  *  TLS is configured via a nested <Ssl> element.
  *  The attacker can present a certificate issued by a CA trusted by the appender's configured trust store, or by the default Java trust store if none is configured.
This issue does not affect users of the HTTP appender, which uses a separate  verifyHostname https://logging.apache.org/log4j/2.x/manual/appenders/network.html#HttpAppender-attr-verifyHostName  attribute that was not subject to this bug and verifies host names by default.

Users are advised to upgrade to Apache Log4j Core 2.25.4, which corrects this issue.

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

## Which versions are affected by CVE-2026-34477?

4 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.12.0 | 2.25.4 |
| `org.apache.logging.log4j:log4j-core` | Maven | From 2.12.0 | 2.25.4 |
| `org.apache.logging.log4j:log4j-core` | Maven | From 3.0.0-alpha1 to 3.0.0-beta3 | None |
| `org.apache.logging.log4j:log4j-core` | Maven | From 3.0.0-alpha1 to 3.0.0-beta3 | None |

Products: Apache Log4j.

## How do I fix CVE-2026-34477?

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

## Is CVE-2026-34477 being exploited?

There is no known exploitation of CVE-2026-34477 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-2026-34477 and fix it if it is affected.

What it is: CVE-2026-34477 is a medium-severity vulnerability in Apache Log4j Core, published on 10 Apr 2026. 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-2026-34477 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.logging.log4j:log4j-core (Maven): affected from 2.12.0; fixed in 2.25.4
- org.apache.logging.log4j:log4j-core (Maven): affected from 2.12.0; fixed in 2.25.4
- org.apache.logging.log4j:log4j-core (Maven): affected from 3.0.0-alpha1 up to 3.0.0-beta3; no fix listed
- org.apache.logging.log4j:log4j-core (Maven): affected from 3.0.0-alpha1 up to 3.0.0-beta3; no fix listed

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-2026-34477/ (Markdown: https://insights.sbomify.com/CVE-2026-34477/index.md)
```

## Sources

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

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