# CVE-2026-34480: Apache Log4j Core: Silent log event loss in XmlLayout due to unescaped XML 1.0 forbidden characters

> Attackers can cause log event loss or malformed XML output in Apache Log4j by injecting forbidden characters, potentially disrupting log processing.

- **Severity:** Medium 6.9 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/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-BH90179, CLEANSTART-2026-GM49347, CLEANSTART-2026-JA22493, CLEANSTART-2026-JH04977, CLEANSTART-2026-OV82681, CLEANSTART-2026-YQ06926, CLSA-2026-1790872128, CLSA-2026-1791190936, CLSA-2026-1792102359, CLSA-2026-1792577744, CLSA-2026-1792694422, CLSA-2026-1792694968, CLSA-2026-1793191907, DEBIAN-CVE-2026-34480, ECHO-2fdc-9fb7-c602, GHSA-3pxv-7cmr-fjr4, MINI-2589-36pf-gwmm, MINI-268h-qw5h-mhqh, MINI-28gp-6rr2-24m7, MINI-2hqc-qjfr-jrgp, MINI-2mhq-p778-4wwp, MINI-2v83-3pfr-wcpf, MINI-32m4-cjmq-q78f, MINI-32p2-96qj-fxqx, MINI-3923-684f-cqp2, MINI-3hhg-jppj-8mp2, MINI-43mr-cfvq-464g, MINI-45wq-pj9w-4vwr, MINI-4hrw-4g69-8vg5, MINI-4mv8-g575-pg3p, MINI-4mx3-p93p-fc4f, MINI-4rh7-cc9x-jmmf, MINI-568v-9j7v-9h5q, MINI-5c62-vfhc-7v5j, MINI-5q6x-7jgg-98j3, MINI-6jc4-j29r-v84p, MINI-6p37-5j3c-w2vr, MINI-6r4r-fgjg-j4q2, MINI-7ghf-qjxg-p3vc, MINI-7hvg-j6jr-4fgj, MINI-7j2p-vcg4-8f24, MINI-7x2q-xxj2-q9h6, MINI-87xc-xjx6-9864, MINI-8fhg-pv9x-jh34, MINI-8ppp-gvqm-22wq, MINI-8q2w-7frq-hqjv, MINI-95xm-p5qh-x6fq, MINI-9hmj-qm66-jwqf, MINI-9pwq-cr7m-672g, MINI-9rq7-4gqc-qhp8, MINI-9rr6-prjm-f28w, MINI-c2xm-w5v6-rgcj, MINI-c3vg-wf42-95jf, MINI-c8x7-xg2x-fg47, MINI-c8x8-8cmw-p5c5, MINI-cqv8-m92q-9f3m, MINI-cw4r-7xq7-99v9, MINI-f3p5-xj94-3mrv, MINI-ffc9-cr6w-jr28, MINI-g9pp-75j4-qpjm, MINI-h283-mv2f-hrrh, MINI-h38g-4h2f-qqcj, MINI-h94q-r36w-x3qp, MINI-hp9h-5p3h-8m3x, MINI-hqqc-xxr4-mwhj, MINI-j37p-c735-25hq, MINI-j66x-9cqx-hmj5, MINI-m3hm-68vp-7rqj, MINI-m88j-mrfv-fj6j, MINI-mfhj-v9fx-vf33, MINI-mpc4-5r8v-v3fx, MINI-p6r2-cg5f-h785, MINI-p934-hhvm-f2hq, MINI-pc6f-986x-g2q5, MINI-pjf5-8gxj-fvcq, MINI-pqc5-hpq2-x6wg, MINI-px28-77w9-pgw4, MINI-q44j-gchf-6qj2, MINI-q7c2-4wj7-g473, MINI-qm8c-rjf2-wwc3, MINI-qwpw-vcqc-p2j2, MINI-rc7m-jv9h-cf7p, MINI-rf2r-32gg-78h8, MINI-rq57-m8w3-x28p, MINI-rxqp-gq37-vwff, MINI-v4c6-mx66-v3q9, MINI-v5pv-jmfg-52fm, MINI-v8j2-h48g-gmvv, MINI-v8wf-fg93-qq8c, MINI-vgh2-px44-g6wf, MINI-vh47-rcr2-4v67, MINI-vh94-hrgj-fwcf, MINI-vqc5-xpcm-rg6m, MINI-vqj9-7mjr-qqxm, MINI-vvcp-f7q9-97mw, MINI-w37c-74gh-5m5j, MINI-w7qj-h8h7-78mm, MINI-wc2p-mpmq-jxjh, MINI-wcp7-895c-35rj, MINI-wg72-h3f4-hwcg, MINI-wr69-56gx-27pw, MINI-x3xx-frrw-hhr4, MINI-x6v4-cwgm-gp2q, MINI-xcvh-hxgh-rvm8, MINI-xqg2-gpph-j75r, MINI-xr52-vx63-g5c9, ROOT-APP-MAVEN-CVE-2026-34480, UBUNTU-CVE-2026-34480

## What is CVE-2026-34480?

CVE-2026-34480 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

Apache Log4j Core's  XmlLayout https://logging.apache.org/log4j/2.x/manual/layouts.html#XmlLayout , in versions up to and including 2.25.3, fails to sanitize characters forbidden by the  XML 1.0 specification https://www.w3.org/TR/xml/#charsets  producing invalid XML output whenever a log message or MDC value contains such characters.

The impact depends on the StAX implementation in use:

  *  JRE built-in StAX: Forbidden characters are silently written to the output, producing malformed XML. Conforming parsers must reject such documents with a fatal error, which may cause downstream log-processing systems to drop the affected records.
  *  Alternative StAX implementations (e.g.,  Woodstox https://github.com/FasterXML/woodstox , a transitive dependency of the Jackson XML Dataformat module): An exception is thrown during the logging call, and the log event is never delivered to its intended appender, only to Log4j's internal status logger.

Users are advised to upgrade to Apache Log4j Core 2.25.4, which corrects this issue by sanitizing forbidden characters before XML output.

Weakness: CWE-116 (Improper Encoding or Escaping of Output)

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

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.0-alpha1 | 2.25.4 |
| `org.apache.logging.log4j:log4j-core` | Maven | From 2.0-alpha1 | 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-34480?

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

## Is CVE-2026-34480 being exploited?

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

What it is: CVE-2026-34480 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-34480 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.logging.log4j:log4j-core (Maven): affected from 2.0-alpha1; fixed in 2.25.4
- org.apache.logging.log4j:log4j-core (Maven): affected from 2.0-alpha1; 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-34480/ (Markdown: https://insights.sbomify.com/CVE-2026-34480/index.md)
```

## Sources

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

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