Vulnerability · Published Apr 10, 2026 · Assigned by apache
CVE-2026-34481Apache Log4j JSON Template Layout: Improper serialization of non-finite floating-point values in JsonTemplateLayout
Medium 6.3
In plain English
A medium-severity security flaw in Apache Log4j JSON Template Layout from Apache Software Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 53% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
Apache Log4j's JsonTemplateLayout https://logging.apache.org/log4j/2.x/manual/json-template-layout.html , in versions up to and including 2.25.3, produces invalid JSON output when log events contain non-finite floating-point values (NaN, Infinity, or -Infinity), which are prohibited by RFC 8259. This may cause downstream log processing systems to reject or fail to index affected records. An attacker can exploit this issue only if both of the following conditions are met: * The application uses JsonTemplateLayout. * The application logs a MapMessage, or logs an object directly (e.g., via Logger.info(Object), which wraps it in an ObjectMessage), where the message contains an attacker-controlled floating-point value. Users are advised to upgrade to Apache Log4j JSON Template Layout 2.25.4, which corrects this issue. Note: The fix released in version 2.25.4 did not cover all affected code paths. CVE-2026-49844 was assigned to the remaining issue, which concerns the MapMessage.asJson() serialization in Apache Log4j API and is fixed in versions 2.25.5 and 2.26.1.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | apache-log4j2 | no fix listed | DEBIAN-CVE-2026-34481 |
| Debian:13 | apache-log4j2 | no fix listed | DEBIAN-CVE-2026-34481 |
| Debian:14 | apache-log4j2 | no fix listed | DEBIAN-CVE-2026-34481 |
| Maven | org.apache.logging.log4j:log4j-layout-template-json | 2.25.4 | GHSA-w35j-pv5h-q9q9 |
| Maven | org.apache.logging.log4j:log4j-layout-template-json | no fix listed | GHSA-w35j-pv5h-q9q9 |
| Ubuntu:22.04:LTS | apache-log4j1.2 | no fix listed | UBUNTU-CVE-2026-34481 |
| Ubuntu:24.04:LTS | apache-log4j1.2 | no fix listed | UBUNTU-CVE-2026-34481 |
| Ubuntu:25.10 | apache-log4j1.2 | no fix listed | UBUNTU-CVE-2026-34481 |
| Ubuntu:26.04:LTS | apache-log4j1.2 | no fix listed | UBUNTU-CVE-2026-34481 |
| Ubuntu:26.10 | apache-log4j1.2 | no fix listed | UBUNTU-CVE-2026-34481 |
| Ubuntu:22.04:LTS | apache-log4j2 | no fix listed | UBUNTU-CVE-2026-34481 |
| Ubuntu:24.04:LTS | apache-log4j2 | no fix listed | UBUNTU-CVE-2026-34481 |
| Ubuntu:25.10 | apache-log4j2 | no fix listed | UBUNTU-CVE-2026-34481 |
| Ubuntu:26.04:LTS | apache-log4j2 | no fix listed | UBUNTU-CVE-2026-34481 |
| Ubuntu:26.10 | apache-log4j2 | no fix listed | UBUNTU-CVE-2026-34481 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Apache Software Foundation | Apache Log4j JSON Template Layout | 2.14.0 – before 2.25.43.0.0-alpha1 – through 3.0.0-beta3 |
Weakness: CWE-116 · Vector: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N
References
- https://github.com/apache/logging-log4j2/pull/4080 patch
- https://logging.apache.org/security.html#CVE-2026-34481 vendor-advisory
- https://logging.apache.org/cyclonedx/vdr.xml vendor-advisory
- https://logging.apache.org/log4j/2.x/manual/json-template-layout.html related
- https://lists.apache.org/thread/n34zdv00gbkdbzt2rx9rf5mqz6lhopcv vendor-advisory
- http://www.openwall.com/lists/oss-security/2026/04/10/10