# CVE-2026-49844: Apache Log4j API: Improper serialization of non-finite floating-point values in MapMessage.asJson()

- Severity: Medium 6.3 (CVSS:4.0, scored by apache) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.57%, higher than 48% of CVEs (2026-12-01)
- Published: 2026-07-10T21:14:59.111Z
- Modified: 2026-10-25T15:10:00.147Z
- Also known as: GHSA-qv9r-c865-cp47
- Weaknesses: CWE-116
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: apache

## 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.

(As written by CVE List.)

## Affected

- org.apache.logging.log4j:log4j-api: from 2.13.1 before 2.25.5; from 2.26.0 before 2.26.1; from 3.0.0-alpha1 up to 3.0.0-beta2
- org.apache.logging.log4j:log4j-api (Maven): from 2.13.1 before 2.25.5; from 2.26.0 before 2.26.1
- apache log4j: from 2.13.1 before 2.25.5; 2.26.0; 3.0.0

## Every score

- apache: CVSS:4.0 6.3 Medium `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`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`

## References

- <https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-template-resolver-message> (product, related, web)
- <https://github.com/apache/logging-log4j2/pull/4163> (issue-tracking, patch, web)
- <https://logging.apache.org/cyclonedx/vdr.xml> (vendor-advisory, web)
- <https://logging.apache.org/security.html#CVE-2026-49844> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-49844> (advisory)
- <https://github.com/apache/logging-log4j2/commit/19edb23e162d6c728a8c2221a240037d389ed300> (web)
- <https://github.com/apache/logging-log4j2/commit/feadf8eb0b4acb6ddfa4c0ab2bbc6d88b8e12d82> (web)
- <https://github.com/apache/logging-log4j2> (package)
- <https://github.com/apache/logging-log4j2/releases/tag/rel/2.25.5> (web)
- <https://github.com/apache/logging-log4j2/releases/tag/rel/2.26.1> (web)

## Sources

- CVE List: [CVE-2026-49844](https://www.cve.org/CVERecord?id=CVE-2026-49844), CVE Terms of Use, modified 2026-09-17
- GitHub Advisory Database: [GHSA-qv9r-c865-cp47](https://github.com/advisories/GHSA-qv9r-c865-cp47), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-49844](https://nvd.nist.gov/vuln/detail/CVE-2026-49844), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-49844 · Whole record: https://cve.day/CVE-2026-49844.json · Rebuilt by cve.day 2026-11-25T22:59:27.700Z
