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.

Severity (CVSS 4.0)6.3Medium
Exploit odds (30 days)0.7%top 47.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling1Public PoC

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

EcosystemPackageFixed inAdvisory
Debian:12apache-log4j2no fix listedDEBIAN-CVE-2026-34481
Debian:13apache-log4j2no fix listedDEBIAN-CVE-2026-34481
Debian:14apache-log4j2no fix listedDEBIAN-CVE-2026-34481
Mavenorg.apache.logging.log4j:log4j-layout-template-json2.25.4GHSA-w35j-pv5h-q9q9
Mavenorg.apache.logging.log4j:log4j-layout-template-jsonno fix listedGHSA-w35j-pv5h-q9q9
Ubuntu:22.04:LTSapache-log4j1.2no fix listedUBUNTU-CVE-2026-34481
Ubuntu:24.04:LTSapache-log4j1.2no fix listedUBUNTU-CVE-2026-34481
Ubuntu:25.10apache-log4j1.2no fix listedUBUNTU-CVE-2026-34481
Ubuntu:26.04:LTSapache-log4j1.2no fix listedUBUNTU-CVE-2026-34481
Ubuntu:26.10apache-log4j1.2no fix listedUBUNTU-CVE-2026-34481
Ubuntu:22.04:LTSapache-log4j2no fix listedUBUNTU-CVE-2026-34481
Ubuntu:24.04:LTSapache-log4j2no fix listedUBUNTU-CVE-2026-34481
Ubuntu:25.10apache-log4j2no fix listedUBUNTU-CVE-2026-34481
Ubuntu:26.04:LTSapache-log4j2no fix listedUBUNTU-CVE-2026-34481
Ubuntu:26.10apache-log4j2no fix listedUBUNTU-CVE-2026-34481

Affected products (as reported)

VendorProductVersions
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