Skip to main content

Apache Log4J Json Template Layout CVE-2026-34481

| EUVDEUVD-2026-21412 MEDIUM
Improper Encoding or Escaping of Output (CWE-116)
2026-04-10 apache GHSA-w35j-pv5h-q9q9
6.3
CVSS 4.0 · Vendor: apache
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding for downstream
Impact

This vulnerability carries moderate real-world risk despite a CVSS score of 6.3. The attack vector is network-based and requires no authentication (PR:N per CVSS 4.0), but attack complexity is high (AC:H) and requires attacker interaction or preparation (AT:P), meaning an attacker must control the floating-point values passed to logging calls-a constraint that significantly reduces exploitation likelihood in practice. The integrity impact is limited (SI:L): the vulnerability causes log records to be malformed or rejected, not intercepted or modified in transit, resulting in information disclosure or availability loss rather than confidentiality breach. There is no confirmed active exploitation (KEV status: not listed as known exploited), no publicly available proof-of-concept code referenced, and no evidence of weaponization. SSVC framework assessment: exploitation is proof-of-concept (requires specific application code patterns), the impact is technical (log pipeline failure), and the affected system is typically a backend service not directly internet-facing. Real-world priority depends on whether the organization uses JsonTemplateLayout and whether untrusted data flows into logging calls-many Log4j deployments use default layouts or SimpleLayout and are unaffected. For organizations using JsonTemplateLayout with user-controlled numeric inputs, this is a legitimate availability concern; for others, it is a low priority.

Exploit ScenarioDerived

A web application uses Apache Log4j with JsonTemplateLayout to log analytics events, and includes a numeric field (e.g., request duration or score) that is computed from untrusted user input. An attacker crafts a request that causes a division-by-zero or other floating-point operation resulting in NaN or Infinity, which is then logged via a MapMessage. The JsonTemplateLayout serializes the event to invalid JSON (e.g., '{"duration":NaN}'), causing the downstream Elasticsearch or Splunk indexing pipeline to reject the record, resulting in log loss and obscuring the attack in audit logs. Exploitation requires direct control over numeric values flowing into logging calls, making it a concern primarily for applications that log mathematical computations or parsed numeric data from user input.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 10, 2026

Apache Log4j JsonTemplateLayout versions up to 2.25.3 generate invalid JSON when logging non-finite floating-point values (NaN, Infinity, -Infinity), violating RFC 8259 and causing downstream log processing systems to fail indexing or reject records. An unauthenticated remote attacker can trigger this by controlling floating-point values in MapMessages logged by vulnerable applications, resulting in data loss or processing failures in log aggregation pipelines. Vendor-released patch: version 2.25.4.

RemediationAI

Vendor-released patch: upgrade to Apache Log4j JSON Template Layout version 2.25.4 or later, which corrects the non-finite floating-point serialization issue. The fix is available in the upstream repository at https://github.com/apache/logging-log4j2/pull/4080. Organizations unable to upgrade immediately should review whether they are using JsonTemplateLayout (the default layouts are unaffected); if in use, implement input validation to reject or sanitize non-finite floating-point values before logging, or switch to an alternative layout format (e.g., PatternLayout or SimpleLayout). Refer to the official security advisory at https://logging.apache.org/security.html#CVE-2026-34481 and https://logging.apache.org/cyclonedx/vdr.xml for detailed remediation guidance.

Affected VersionsENISA

Apache Log4j JSON Template Layout 2.14.0 <2.25.4
Apache Log4j JSON Template Layout 3.0.0-alpha1 ≤3.0.0-beta3

Affected Packages

maven org.apache.logging.log4j:log4j-layout-template-json fix: 2.25.4
euvd apache_log4j_json_template_layout fix: 2.25.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in maven, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

JsonTemplateLayout is Apache Log4j's structured JSON output formatter, used to generate RFC 8259-compliant JSON for log events. The vulnerability stems from improper handling of non-finite IEEE 754 floating-point values (NaN and infinities), which are explicitly forbidden by the JSON specification but are valid Java double/float values. When an application logs a MapMessage (a key-value log event) containing such values, JsonTemplateLayout serializes them as literal JSON strings (e.g., 'NaN', 'Infinity'), creating malformed JSON. This violates CWE-116 (Improper Encoding or Escaping of Output), where output is not properly sanitized for the consuming format. The affected component is the JSON serialization logic within the JsonTemplateLayout class (CPE: cpe:2.3:a:apache_software_foundation:apache_log4j_json_template_layout:*:*:*:*:*:*:*:*), which is part of Apache Log4j 2.x.

Know when Apache Log4J Json Template Layout gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (apache) PRIMARY 6.3 MEDIUM
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
SUSE 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Red Hat 5.3 MEDIUM

Primary rating from Vendor (apache).

CVSS VectorVendor: apache

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch released
Apr 10, 2026 - 16:00 nvd
Patch available
CVE Published
Apr 10, 2026 - 15:43 nvd
MEDIUM 6.3

DescriptionCVE.org

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 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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 69% exploitable
Threat Intel
1
1 source
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Related Vulnerabilities in Apache Log4j Multiple XML Injection and Escaping

View all 4

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Module for Basesystem 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy