The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-34481

CVE-2026-34481: Apache Log4j JSON Output Vulnerability

CVE-2026-34481 is a vulnerability in Apache Log4j's JsonTemplateLayout that produces invalid JSON when processing non-finite floating-point values, potentially disrupting log processing systems. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: April 17, 2026

CVE-2026-34481 Overview

Apache Log4j's JsonTemplateLayout component contains a vulnerability that produces invalid JSON output when log events contain non-finite floating-point values (NaN, Infinity, or -Infinity), which are prohibited by RFC 8259. This improper encoding of special characters (CWE-116) may cause downstream log processing systems to reject or fail to index affected records, potentially disrupting logging infrastructure and security monitoring capabilities.

An attacker can exploit this issue only when both of the following conditions are met: the application uses JsonTemplateLayout, and the application logs a MapMessage containing an attacker-controlled floating-point value. While the vulnerability requires specific conditions to exploit, successful attacks could undermine log integrity and monitoring systems.

Critical Impact

Applications using Apache Log4j JsonTemplateLayout with versions up to and including 2.25.3 may produce malformed JSON logs when processing attacker-controlled floating-point values, potentially causing log processing failures and loss of visibility into application behavior.

Affected Products

  • Apache Log4j JSON Template Layout versions up to and including 2.25.3
  • Applications using JsonTemplateLayout that log MapMessage objects with user-controlled floating-point data

Discovery Timeline

  • April 10, 2026 - CVE-2026-34481 published to NVD
  • April 13, 2026 - Last updated in NVD database

Technical Details for CVE-2026-34481

Vulnerability Analysis

This vulnerability stems from improper output encoding (CWE-116) within Apache Log4j's JsonTemplateLayout component. The core issue lies in how the layout handles special floating-point values that are valid in Java but prohibited by the JSON specification defined in RFC 8259.

When an application logs a MapMessage containing floating-point values such as Double.NaN, Double.POSITIVE_INFINITY, or Double.NEGATIVE_INFINITY, JsonTemplateLayout directly serializes these values into the JSON output without proper encoding or substitution. Since RFC 8259 explicitly prohibits these non-finite numeric values, the resulting JSON becomes technically invalid and may be rejected by downstream systems.

The attack surface requires that an attacker can influence floating-point values that get logged via MapMessage. This could occur through user-supplied data that triggers mathematical operations resulting in non-finite values, or through direct injection of such values where input validation is insufficient.

Root Cause

The root cause is improper output encoding in the JsonTemplateLayout class when serializing floating-point numbers. The component fails to validate or sanitize non-finite floating-point values before writing them to the JSON output stream. Rather than replacing invalid values with compliant alternatives (such as null or string representations), the layout writes the raw Java string representations directly, producing RFC 8259-violating output.

Attack Vector

The vulnerability is exploitable over the network but requires both high attack complexity and specific preconditions. An attacker must:

  1. Identify an application using Apache Log4j with JsonTemplateLayout configured
  2. Find an input vector that allows influencing floating-point values logged via MapMessage
  3. Supply values that result in NaN, Infinity, or -Infinity being logged (either directly or through mathematical operations like division by zero)

The attack's impact is primarily against downstream log processing infrastructure rather than the application itself. Successful exploitation could cause log aggregation systems (such as Elasticsearch, Splunk, or custom SIEM solutions) to reject malformed records, creating gaps in security visibility.

The vulnerability mechanism involves improper handling of special floating-point values during JSON serialization. When a MapMessage contains values like Double.NaN or Double.POSITIVE_INFINITY, these are written directly to the JSON output. For example, a legitimate floating-point value would serialize correctly as valid JSON, but non-finite values are serialized in their raw Java string form (e.g., NaN or Infinity), which violates RFC 8259 that explicitly prohibits such values in JSON. For detailed technical information, see the GitHub Pull Request that addresses this issue.

Detection Methods for CVE-2026-34481

Indicators of Compromise

  • JSON parsing errors in log aggregation systems (Elasticsearch, Splunk, Logstash) indicating malformed records
  • Log entries containing literal NaN, Infinity, or -Infinity strings in JSON-formatted output
  • Increased rate of rejected or failed log indexing operations in downstream processing systems
  • Application logs showing MapMessage entries with suspicious or unusual floating-point values

Detection Strategies

  • Monitor log aggregation pipelines for JSON parsing failures that may indicate malformed Log4j output
  • Implement input validation monitoring to detect attempts to inject non-finite floating-point values
  • Review application configurations to identify usage of JsonTemplateLayout in Log4j configurations
  • Deploy SentinelOne agents to detect anomalous logging behavior and potential exploitation attempts

Monitoring Recommendations

  • Configure alerts for spikes in log parsing errors at the log aggregation layer
  • Implement application-level logging to track MapMessage usage patterns and detect suspicious floating-point inputs
  • Use SentinelOne's behavioral AI to identify unusual application patterns that may indicate exploitation attempts
  • Regularly audit Log4j configuration files (log4j2.xml, log4j2.properties) for JsonTemplateLayout usage

How to Mitigate CVE-2026-34481

Immediate Actions Required

  • Upgrade Apache Log4j JSON Template Layout to version 2.25.4 or later, which corrects the non-finite floating-point handling
  • Audit applications to identify any using JsonTemplateLayout with MapMessage logging of user-controlled data
  • Implement input validation to reject or sanitize non-finite floating-point values before they reach logging code
  • Consider temporarily switching to alternative layout formats if immediate patching is not feasible

Patch Information

Apache has released Log4j JSON Template Layout version 2.25.4 to address this vulnerability. The patch ensures that non-finite floating-point values are properly handled according to RFC 8259 compliance requirements. Users should upgrade all affected Log4j installations to this version.

For detailed patch information, consult the Apache Security Advisory for CVE-2026-34481 and the GitHub Pull Request #4080.

Additional resources:

  • Apache Mailing List Discussion
  • Apache CycloneDX VDR Document
  • OpenWall OSS-Security Announcement

Workarounds

  • Implement application-level input validation to filter non-finite floating-point values before logging
  • Switch to alternative Log4j layout formats (such as PatternLayout or XMLLayout) that handle non-finite values differently
  • Deploy downstream JSON validation or sanitization in log processing pipelines to handle malformed records gracefully
  • Consider wrapping floating-point logging operations with explicit checks for Double.isFinite() before logging
bash
# Example: Check Log4j version and configuration
# Identify Log4j JAR versions in your application
find /path/to/application -name "log4j-*.jar" -exec basename {} \;

# Search for JsonTemplateLayout usage in configuration files
grep -r "JsonTemplateLayout" /path/to/application/config/

# Verify updated version after patching
java -cp "log4j-core-2.25.4.jar:log4j-api-2.25.4.jar" org.apache.logging.log4j.util.Log4jVersionInfo

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeOther

  • Vendor/TechApache Log4j

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.16%

  • Known ExploitedNo
  • CVSS Vector
  • 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-116
  • Technical References
  • GitHub Pull Request

  • Apache Mailing List Thread

  • Apache CycloneDX Document

  • Apache Log4j JSON Template Layout

  • Apache Security CVE-2026-34481

  • OpenWall OSS-Security Message
  • Related CVEs
  • CVE-2026-34479: Apache Log4j XML Output Vulnerability

  • CVE-2026-34478: Apache Log4j Core Log Injection Vulnerability

  • CVE-2026-34480: Apache Log4j Core XXE Vulnerability

  • CVE-2021-44228: Siemens 6bk1602-0aa12-0tp0 RCE Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English