Skip to content

CVE-2026-34481 Apache Log4j JSON Template Layout: Improper serialization of non-finite floating-point values in JsonTemplateLayout

MediumCVSS 6.3 EPSS 0.72%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
UbuntuDebianRed Hat

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.

Upgrade path

23 packages: 3 fixed, 20 with no fix yet.

PackageAffectedFixed inStatus
debian/apache-log4j2(Debian 12) = 2.19.0-2; = 2.26.1-1; All versions No fix listed No fix yet
debian/apache-log4j2(Debian 13) = 2.19.0-2; = 2.26.1-1; All versions No fix listed No fix yet
debian/apache-log4j2(Debian 14) = 2.19.0-2; = 2.26.1-1; All versions No fix listed No fix yet
redhat/log4j(Red Hat enterprise_linux 9) All versions No fix listed No fix yet
redhat/log4j-layout-template-json(Red Hat amq_broker 7.13) All versions No fix listed No fix yet
redhat/log4j-layout-template-json(Red Hat amq_broker 7.14) All versions No fix listed No fix yet
redhat/log4j-layout-template-json(Red Hat amq_streams 3.2 el9) All versions No fix listed No fix yet
redhat/log4j-layout-template-json(Red Hat apache_camel_spring_boot 4.18) All versions No fix listed No fix yet
redhat/log4j-layout-template-json(Red Hat jboss_data_grid 8.6) All versions No fix listed No fix yet
redhat/log4j-layout-template-json(Red Hat jboss_enterprise_application_platform 7) All versions No fix listed No fix yet
redhat/offline-knowledge-portal/rhokp-rhel9:1779996999(Red Hat offline_knowledge_portal 1.2 el9) All versions No fix listed No fix yet
redhat/redhat-user-workloads/rhokp-core-encrypted(Red Hat offline_knowledge_portal 1) All versions No fix listed No fix yet
ubuntu/apache-log4j1.2(Ubuntu 22.04) All versions No fix listed No fix yet
ubuntu/apache-log4j1.2(Ubuntu 24.04) All versions No fix listed No fix yet
ubuntu/apache-log4j1.2(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/apache-log4j1.2(Ubuntu 26.10) All versions No fix listed No fix yet
ubuntu/apache-log4j2(Ubuntu 22.04) All versions No fix listed No fix yet
ubuntu/apache-log4j2(Ubuntu 24.04) All versions No fix listed No fix yet
ubuntu/apache-log4j2(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/apache-log4j2(Ubuntu 26.10) All versions No fix listed No fix yet
apache log4j = 3.0.0-alpha1; = 3.0.0-alpha1_rc1; = 3.0.0-alpha1_rc2; = 3.0.0-beta1 +3 more 2.25.4 Fixed
apache log4j layout template json(Maven) >= 2.14.0, < 2.25.4; >= 3.0.0-alpha1, <= 3.0.0-beta3 2.25.4 Fixed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.14.0; = 2.14.1; = 2.15.0; = 2.16.0 +26 more 2.25.4 Fixed

Affected products

ProductAffected versionsFixed in
apache log4j layout template json(Maven) >= 2.14.0, < 2.25.4 2.25.4
apache log4j layout template json(Maven) >= 3.0.0-alpha1, <= 3.0.0-beta3 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) >= 2.14.0, < 2.25.4 2.25.4
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.14.0 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.14.1 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.15.0 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.16.0 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.17.0 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.17.1 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.17.2 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.18.0 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.19.0 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.20.0 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.21.0 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.21.1 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.22.0 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.22.1 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.23.0 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.23.1 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.24.0 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.24.1 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.24.2 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.24.3 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.25.0 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.25.1 No fix listed
Show 40 more
ProductAffected versionsFixed in
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.25.2 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 2.25.3 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) >= 3.0.0-alpha1, <= 3.0.0-beta3 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 3.0.0-alpha1 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 3.0.0-beta1 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 3.0.0-beta2 No fix listed
org.apache.logging.log4j/log4j-layout-template-json(Maven) = 3.0.0-beta3 No fix listed
debian/apache-log4j2(Debian:12) All versions No fix listed
debian/apache-log4j2(Debian:12) = 2.19.0-2 No fix listed
debian/apache-log4j2(Debian:12) = 2.26.1-1 No fix listed
debian/apache-log4j2(Debian:13) All versions No fix listed
debian/apache-log4j2(Debian:13) = 2.19.0-2 No fix listed
debian/apache-log4j2(Debian:13) = 2.26.1-1 No fix listed
debian/apache-log4j2(Debian:14) All versions No fix listed
debian/apache-log4j2(Debian:14) = 2.19.0-2 No fix listed
debian/apache-log4j2(Debian:14) = 2.26.1-1 No fix listed
redhat/log4j-layout-template-json(Red Hat:amq_broker:7.13) All versions No fix listed
redhat/log4j-layout-template-json(Red Hat:amq_broker:7.14) All versions No fix listed
redhat/log4j-layout-template-json(Red Hat:apache_camel_spring_boot:4.18) All versions No fix listed
redhat/log4j-layout-template-json(Red Hat:jboss_data_grid:8.6) All versions No fix listed
redhat/log4j-layout-template-json(Red Hat:amq_streams:3.2::el9) All versions No fix listed
redhat/offline-knowledge-portal/rhokp-rhel9:1779996999(Red Hat:offline_knowledge_portal:1.2::el9) All versions No fix listed
redhat/log4j(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/log4j-layout-template-json(Red Hat:jboss_enterprise_application_platform:7) All versions No fix listed
redhat/redhat-user-workloads/rhokp-core-encrypted(Red Hat:offline_knowledge_portal:1) All versions No fix listed
ubuntu/apache-log4j1.2(Ubuntu:22.04) All versions No fix listed
ubuntu/apache-log4j2(Ubuntu:22.04) All versions No fix listed
ubuntu/apache-log4j1.2(Ubuntu:24.04) All versions No fix listed
ubuntu/apache-log4j2(Ubuntu:24.04) All versions No fix listed
ubuntu/apache-log4j1.2(Ubuntu:26.04) All versions No fix listed
ubuntu/apache-log4j2(Ubuntu:26.04) All versions No fix listed
ubuntu/apache-log4j1.2(Ubuntu:26.10) All versions No fix listed
ubuntu/apache-log4j2(Ubuntu:26.10) All versions No fix listed
apache log4j >= 2.14.0, < 2.25.4 2.25.4
apache log4j = 3.0.0-alpha1 No fix listed
apache log4j = 3.0.0-alpha1_rc1 No fix listed
apache log4j = 3.0.0-alpha1_rc2 No fix listed
apache log4j = 3.0.0-beta1 No fix listed
apache log4j = 3.0.0-beta2 No fix listed
apache log4j = 3.0.0-beta3 No fix listed

References