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

Published Apr 10, 2026
·
Updated

Apache Log4j's JsonTemplateLayout

Other sources

Apache Log4j's JsonTemplateLayout, 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 containing an attacker-controlled floating-point value.

Users are advised to upgrade to Apache Log4j JSON Template Layout 2.25.4, which corrects this issue.

GitHub

Affected Software

11 affected componentsFixes available
maven/org.apache.logging.log4j:log4j-layout-template-json>=3.0.0-alpha1<3.0.0-beta3
3.0.0-beta3
maven/org.apache.logging.log4j:log4j-layout-template-json>=2.14.0<2.25.4
2.25.4
maven/org.apache.logging.log4j:log4j-layout-template-json>=3.0.0-alpha1<=3.0.0-beta3
Apache Log4j>=2.14.0<2.25.4
Apache Log4j=3.0.0-alpha1
Apache Log4j=3.0.0-alpha1_rc1
Apache Log4j=3.0.0-alpha1_rc2
Apache Log4j=3.0.0-beta1
Apache Log4j=3.0.0-beta2
Apache Log4j=3.0.0-beta3
IBM watsonx.data<=2.2- 2.3.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.apache.logging.log4j:log4j-layout-template-json to a version that resolves this vulnerability.

    Fixed in 3.0.0-beta3
  2. Upgrade

    Upgrade maven/org.apache.logging.log4j:log4j-layout-template-json to a version that resolves this vulnerability.

    Fixed in 2.25.4
  3. Upgrade

    Upgrade Apache Log4j JsonTemplateLayout to a version that resolves this vulnerability.

    Fixed in 2.25.4
  4. Upgrade

    Upgrade Apache Log4j API (MapMessage.asJson serialization) to a version that resolves this vulnerability.

    Fixed in 2.25.5Patch CVE-2026-49844
  5. Upgrade

    Upgrade Apache Log4j API (MapMessage.asJson serialization) to a version that resolves this vulnerability.

    Fixed in 2.26.1Patch CVE-2026-49844

Event History

Apr 10, 2026
CVE Published
via MITRE·03:43 PM
Data Sourced
via MITRE·03:43 PM
DescriptionWeakness
Data Sourced
via Red Hat·04:02 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·04:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:16 PM
Affected Software
Advisory Published
via GitHub·06:31 PM
Data Sourced
via GitHub·06:31 PM
DescriptionWeaknessAffected Software
May 9, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-34481?

CVE-2026-34481 is classified as a high severity vulnerability due to improper serialization of non-finite floating-point values.

2

How do I fix CVE-2026-34481?

To fix CVE-2026-34481, upgrade your Log4j library to version 2.25.4 or later, or version 3.0.0-beta3.

3

What versions of Apache Log4j are affected by CVE-2026-34481?

CVE-2026-34481 affects Apache Log4j versions up to and including 2.25.3.

4

What does CVE-2026-34481 affect in Apache Log4j?

CVE-2026-34481 affects the JsonTemplateLayout functionality in Apache Log4j, producing invalid JSON output.

5

Is CVE-2026-34481 related to security issues in logging?

Yes, CVE-2026-34481 is a security vulnerability that impacts the integrity of JSON data being logged.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203