CVE-2026-49844
published medium CVSS 4.0 · 6.3Apache Log4j API: Improper serialization of non-finite floating-point values in MapMessage.asJson()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Apache Software Foundation | — | org.apache.logging.log4j:log4j-apiApache Log4j API · 2.13.1 to < 2.25.5 · 2.26.0 to < 2.26.1 · 3.0.0-alpha1 through 3.0.0-beta2 · Other versions: unaffected | Affected | Not stated | apache |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2026-2072 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | log4jnoarch | Listed in advisory | Not stated | ALAS2023-2026-2072 |
| Amazon Linux | AL2023 | log4jsrc | Listed in advisory | Not stated | ALAS2023-2026-2072 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.3 / 10
- Severity
- medium
- Provider
- apache · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Apache Software Foundation | Apache Log4j API | 2.13.1 to < 2.25.5 (affected · maven)2.26.0 to < 2.26.1 (affected · maven)3.0.0-alpha1 through 3.0.0-beta2 (affected · maven)Default: unaffected | apache · cna |
Weaknesses
1- CWE-116 CWE-116 Improper Encoding or Escaping of Output
References
4Provider assertions
2apache · cna
Apache Log4j API: Improper serialization of non-finite floating-point values in MapMessage.asJson()
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 91b8457314ed5217a821cc61b55e6c2bbc1d6c0bee1b7216ba9830a006314bf2
- Ingested
- 23 Sep 2026, 09:17:57 UTC
- Source record
- Official CVE record