CVE-2026-34481: Log4j: non-finite floats break JSON log ingestion

MEDIUM
Published April 10, 2026
CISO Take

Apache Log4j's JsonTemplateLayout (up to 2.25.3) emits malformed, RFC 8259-invalid JSON when a logged value contains NaN, Infinity, or -Infinity, causing downstream log shippers and SIEM parsers to reject or drop the affected record. There's no CVSS score, no CISA KEV listing, no public exploit code, and no Nuclei template — this is a medium-severity data-integrity bug, not remote code execution, and exploitation requires both that the app uses JsonTemplateLayout and that it logs a MapMessage or raw object containing an attacker-controlled floating-point value. The real risk for security teams is observability blind spots: an attacker who can influence a numeric field logged this way can selectively corrupt the JSON record for their own malicious request, causing it to silently fail ingestion into your log pipeline while the rest of your logging continues to function normally. Patch to 2.25.4, but note the fix was incomplete — a related code path (MapMessage.asJson() in Log4j API) remains vulnerable and was assigned CVE-2026-49844, fixed only in 2.25.5 and 2.26.1, so upgrade straight to one of those versions to close both gaps. In the interim, monitor log ingestion error/drop rates in your SIEM as a detection signal, since a spike could indicate someone probing for this behavior to mask other activity.

Sources: NVD logging.apache.org

What is the risk?

Medium severity with no published CVSS vector, no CISA KEV entry, no known public exploit, and no scanner coverage (Nuclei). Exploitability is gated behind two specific preconditions — use of JsonTemplateLayout and logging of attacker-influenced floating-point data via MapMessage/ObjectMessage — which narrows the exposed surface but is a common pattern in Java services that log request parameters (thresholds, scores, prices, telemetry values) for structured observability. The impact is availability/integrity of the logging pipeline itself rather than confidentiality or code execution: malformed records get rejected or fail to index downstream, degrading audit trail completeness rather than compromising the application.

How does the attack unfold?

Entry point
Attacker submits a crafted request to a Java-based AI service where a numeric field they control (e.g., a threshold or score parameter) is set to NaN, Infinity, or -Infinity.
Exploitation
The service logs the request as a MapMessage or ObjectMessage under JsonTemplateLayout, which serializes the non-finite float into RFC 8259-invalid JSON.
Impact
The downstream log shipper or SIEM parser rejects or fails to index the malformed record, creating a monitoring blind spot around the attacker's request.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
org.apache.logging.log4j:log4j-layout-template-json No patch

Do you use org.apache.logging.log4j:log4j-layout-template-json? You're affected.

How severe is it?

CVSS 3.1
N/A
EPSS
0.7%
chance of exploitation in 30 days
Higher than 50% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Trivial

What should I do?

1 step
  1. Upgrade Apache Log4j JSON Template Layout past 2.25.4 directly to 2.25.5 or 2.26.1, since 2.25.4 alone does not cover the MapMessage.asJson() path fixed separately under CVE-2026-49844. As a workaround, validate and sanitize any numeric fields sourced from user input before logging them via MapMessage or ObjectMessage under JsonTemplateLayout (reject or coerce NaN/Infinity/-Infinity before the log call). For detection, monitor your log ingestion pipeline for parse-failure or record-drop rate anomalies, and correlate any spikes with specific endpoints or user sessions as a potential sign of deliberate log-integrity manipulation.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

DoS Framework

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 12 - Record-keeping
ISO 42001
9.1 - Monitoring, measurement, analysis and evaluation

Frequently Asked Questions

What is CVE-2026-34481?

Apache Log4j's JsonTemplateLayout (up to 2.25.3) emits malformed, RFC 8259-invalid JSON when a logged value contains NaN, Infinity, or -Infinity, causing downstream log shippers and SIEM parsers to reject or drop the affected record. There's no CVSS score, no CISA KEV listing, no public exploit code, and no Nuclei template — this is a medium-severity data-integrity bug, not remote code execution, and exploitation requires both that the app uses JsonTemplateLayout and that it logs a MapMessage or raw object containing an attacker-controlled floating-point value. The real risk for security teams is observability blind spots: an attacker who can influence a numeric field logged this way can selectively corrupt the JSON record for their own malicious request, causing it to silently fail ingestion into your log pipeline while the rest of your logging continues to function normally. Patch to 2.25.4, but note the fix was incomplete — a related code path (MapMessage.asJson() in Log4j API) remains vulnerable and was assigned CVE-2026-49844, fixed only in 2.25.5 and 2.26.1, so upgrade straight to one of those versions to close both gaps. In the interim, monitor log ingestion error/drop rates in your SIEM as a detection signal, since a spike could indicate someone probing for this behavior to mask other activity.

Is CVE-2026-34481 actively exploited?

No confirmed active exploitation of CVE-2026-34481 has been reported, but organizations should still patch proactively.

How to fix CVE-2026-34481?

Upgrade Apache Log4j JSON Template Layout past 2.25.4 directly to 2.25.5 or 2.26.1, since 2.25.4 alone does not cover the MapMessage.asJson() path fixed separately under CVE-2026-49844. As a workaround, validate and sanitize any numeric fields sourced from user input before logging them via MapMessage or ObjectMessage under JsonTemplateLayout (reject or coerce NaN/Infinity/-Infinity before the log call). For detection, monitor your log ingestion pipeline for parse-failure or record-drop rate anomalies, and correlate any spikes with specific endpoints or user sessions as a potential sign of deliberate log-integrity manipulation.

What systems are affected by CVE-2026-34481?

This vulnerability affects the following AI/ML architecture patterns: model serving, agent frameworks, MLOps pipelines.

What is the CVSS score for CVE-2026-34481?

No CVSS score has been assigned yet.

What is the AI security impact?

Affected AI Architectures

model servingagent frameworksMLOps pipelines

Compliance Controls Affected

EU AI Act: Article 12
ISO 42001: 9.1

What are the technical details?

Original Advisory

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.

Exploitation Scenario

An attacker interacting with a Java-based AI service — for instance, an inference API accepting a numeric parameter like a confidence threshold or scoring weight — submits a crafted value of NaN or Infinity in that field. The service logs the request as a MapMessage under JsonTemplateLayout, which serializes the non-finite float into invalid JSON. The downstream log shipper or SIEM parser rejects or silently drops that malformed record, meaning the attacker's request never appears in structured security logs, while the rest of the request stream continues to be logged normally — giving the attacker a lightweight way to blind monitoring around their own malicious activity (e.g., probing, abuse, or a follow-on attack) without triggering any alerting on the log pipeline itself.

Weaknesses (CWE)

CWE-116 — Improper Encoding or Escaping of Output: The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.

  • [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using the ESAPI Encoding control [REF-45] or a similar tool, library, or framework. These will help the programmer encode outputs in a manner less prone to error. Alternately, use built-in functions, but consider using wrappers in case those functions are discovered to have a vulnerability.
  • [Architecture and Design] If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated. For example, stored procedures can enforce database query structure and reduce the likelihood of SQL injection.

Source: MITRE CWE corpus.

Timeline

Published
April 10, 2026
Last Modified
July 11, 2026
First Seen
July 11, 2026

Related Vulnerabilities