CVE-2026-49844 — log4j-api
Fix: apache/logging-log4j2#4163CVE-2026-49844 is a CWE-116 vulnerability in org.apache.logging.log4j:log4j-api. A fix is available for org.apache.logging.log4j:log4j-api — see the affected versions and patch details below.
Apache Log4j API: Improper serialization of non-finite floating-point values in MapMessage.asJson()
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-49844.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
org.apache.logging.log4j:log4j-api☕org.apache.logging.log4j:log4j-apiReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Improper encoding of non-finite floating-point values during MapMessage JSON serialization in Apache Log4j API produces output that is not valid JSON. This issue affects Apache Log4j API versions 2.13.1 through 2.25.4 and version 2.26.0.
The fix for CVE-2026-34481 did not cover all code paths: when a MapMessage contains a non-finite IEEE 754 value (NaN, Infinity, or -Infinity), MapMessage.asJson() emits the corresponding bare token. RFC 8259 does not permit these tokens, so a conformant parser rejects the resulting document.
The defect is reachable only when both of the following conditions hold:
- The application uses the message resolver https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-template-resolver-message of JsonTemplateLayout or any other layout that relies on MapMessage.asJson() or MapMessage.getFormattedMessage(new String[]{"JSON"}).
- The application logs a MapMessage that contains an attacker-controlled floating-point value.
An attacker who can supply a non-finite value can cause the affected layout to emit malformed JSON, which may corrupt the enclosing log record or disrupt downstream log ingestion and parsing.
Users are advised to upgrade to Apache Log4j API 2.25.5 or 2.26.1, both of which emit RFC 8259-compliant JSON for non-finite values.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.logging.log4j:log4j-api | ≥ 2.13.1&&< 2.25.5 | 2.25.5org.apache.logging.log4j:log4j-api:2.25.5 |
| ☕Maven | org.apache.logging.log4j:log4j-api | ≥ 2.26.0&&< 2.26.1 | 2.26.1org.apache.logging.log4j:log4j-api:2.26.1 |
Affected Products
log4japacheDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.logging.log4j:log4j-api, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.apache.logging.log4j:log4j-api to 2.25.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-49844 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Important: Apache Log4j API in Red Hat products is affected by improper encoding of non-finite floating-point values during MapMessage JSON serialization. This flaw can lead to malformed JSON output when applications utilize `JsonTemplateLayout` or similar JSON serialization methods and process attacker-controlled…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for CVE-2026-49844 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2026-49844 in your dependencies?
Find it across Maven, including transitive dependencies.