Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-49844: CWE-116 Improper Encoding or Escaping of Output in Apache Software Foundation Apache Log4j API

0
Medium
VulnerabilityCVE-2026-49844cvecve-2026-49844cwe-116
Published: 07/10/2026 (07/10/2026, 21:14:59 UTC)
Source: CVE Database V5
Vendor/Project: Apache Software Foundation
Product: Apache Log4j API

Description

CVE-2026-49844 is a medium severity vulnerability in Apache Log4j API affecting versions 2.13.1 through 2.25.4, 2.26.0, and 3.0.0-alpha1. It involves improper encoding of non-finite floating-point values (NaN, Infinity, -Infinity) during MapMessage JSON serialization, resulting in output that is not valid JSON. This can cause malformed log entries and disrupt downstream log processing when using certain JSON layouts. Users are advised to upgrade to versions 2.25.5 or 2.26.1 which produce RFC 8259-compliant JSON for these values.

CVSS v4.0

Score 6.3medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
Low
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N

Affected software

Apache Software Foundation/org.apache.logging.log4j:log4j-api
pkg:maven/Apache Software Foundation/org.apache.logging.log4j:log4j-api
Affected versions
>=2.13.1 <2.25.5>=2.26.0 <2.26.1
CPE configurations
cpe:2.3:a:apache:log4j_api:*:*:*:*:*:*:*:*

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/10/2026, 21:47:37 UTC

Technical Analysis

The vulnerability arises because the fix for a previous issue (CVE-2026-34481) did not cover all code paths in Apache Log4j API's MapMessage JSON serialization. When a MapMessage contains non-finite IEEE 754 floating-point values, the asJson() method emits bare tokens (NaN, Infinity, -Infinity) which are invalid according to RFC 8259 JSON standards. This defect manifests only if the application uses the JsonTemplateLayout's message resolver or any layout relying on MapMessage.asJson() or MapMessage.getFormattedMessage(new String[]{"JSON"}), and logs a MapMessage containing attacker-controlled non-finite values. The malformed JSON output can corrupt log records or disrupt log ingestion and parsing downstream. The issue affects Apache Log4j API versions 2.13.1 through 2.25.4, 2.26.0, and 3.0.0-alpha1. Upgrading to versions 2.25.5 or 2.26.1 resolves the issue by emitting compliant JSON.

Potential Impact

An attacker able to supply non-finite floating-point values in MapMessage logs can cause the affected JSON layouts to emit malformed JSON. This may corrupt the log record or disrupt downstream log ingestion and parsing systems that expect valid JSON. There is no indication of direct code execution or privilege escalation. The impact is primarily on log integrity and reliability of log processing pipelines.

Mitigation Recommendations

Users should upgrade Apache Log4j API to version 2.25.5 or 2.26.1, which fix the improper encoding of non-finite floating-point values in JSON serialization. No other mitigations are indicated. Patch status is not explicitly stated as 'official-fix' in the vendor advisory content, but the description clearly advises upgrading to these fixed versions. Therefore, a fix is available via upgrading to these versions.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
apache
Date Reserved
2026-06-01T20:15:42.977Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a51650f68715ace433b3d10

Added to database: 07/10/2026, 21:33:03 UTC

Last enriched: 07/10/2026, 21:47:37 UTC

Last updated: 07/10/2026, 22:33:45 UTC

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses