CVE-2026-34481: CWE-116 Improper Encoding or Escaping of Output in Apache Software Foundation Apache Log4j JSON Template Layout
Apache Log4j's JsonTemplateLayout up to version 2. 25. 3 produces invalid JSON output when logging non-finite floating-point values such as NaN or Infinity. This violates JSON standards (RFC 8259) and can cause downstream log processing systems to reject or fail to index these log records. Exploitation requires the application to use JsonTemplateLayout and log attacker-controlled floating-point values in a MapMessage. Users are advised to upgrade to version 2. 25. 4 where this issue is corrected.
AI Analysis
Technical Summary
CVE-2026-34481 is a medium severity vulnerability in Apache Log4j's JsonTemplateLayout component. Versions up to 2.25.3 improperly encode or escape non-finite floating-point values (NaN, Infinity, -Infinity) in JSON output, resulting in invalid JSON that violates RFC 8259. This can disrupt downstream log processing systems that consume these logs. Exploitation requires the application to use JsonTemplateLayout and log attacker-controlled floating-point values within a MapMessage. The issue is fixed in version 2.25.4.
Potential Impact
Invalid JSON output caused by improper encoding of non-finite floating-point values can lead to downstream log processing failures, including rejection or failure to index affected log records. This may impact monitoring, alerting, or forensic analysis relying on these logs. There is no indication of direct code execution or data breach from this vulnerability.
Mitigation Recommendations
A fix is available in Apache Log4j JSON Template Layout version 2.25.4. Users should upgrade to this version to correct the improper JSON encoding issue. No other mitigations are indicated or required.
CVE-2026-34481: CWE-116 Improper Encoding or Escaping of Output in Apache Software Foundation Apache Log4j JSON Template Layout
Description
Apache Log4j's JsonTemplateLayout up to version 2. 25. 3 produces invalid JSON output when logging non-finite floating-point values such as NaN or Infinity. This violates JSON standards (RFC 8259) and can cause downstream log processing systems to reject or fail to index these log records. Exploitation requires the application to use JsonTemplateLayout and log attacker-controlled floating-point values in a MapMessage. Users are advised to upgrade to version 2. 25. 4 where this issue is corrected.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-34481 is a medium severity vulnerability in Apache Log4j's JsonTemplateLayout component. Versions up to 2.25.3 improperly encode or escape non-finite floating-point values (NaN, Infinity, -Infinity) in JSON output, resulting in invalid JSON that violates RFC 8259. This can disrupt downstream log processing systems that consume these logs. Exploitation requires the application to use JsonTemplateLayout and log attacker-controlled floating-point values within a MapMessage. The issue is fixed in version 2.25.4.
Potential Impact
Invalid JSON output caused by improper encoding of non-finite floating-point values can lead to downstream log processing failures, including rejection or failure to index affected log records. This may impact monitoring, alerting, or forensic analysis relying on these logs. There is no indication of direct code execution or data breach from this vulnerability.
Mitigation Recommendations
A fix is available in Apache Log4j JSON Template Layout version 2.25.4. Users should upgrade to this version to correct the improper JSON encoding issue. No other mitigations are indicated or required.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- apache
- Date Reserved
- 2026-03-28T19:23:37.127Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69d91fde1cc7ad14dacba290
Added to database: 4/10/2026, 4:05:50 PM
Last enriched: 4/10/2026, 4:21:11 PM
Last updated: 4/10/2026, 5:32:50 PM
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.