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

> Attackers can inject non-finite values to generate invalid JSON logs, disrupting downstream log ingestion and parsing in applications using specific Log4j layouts.

- **Severity:** Medium 6.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Jul 2026
- **Updated:** 17 Sep 2026
- **Also known as:** CLEANSTART-2026-AP60356, CLEANSTART-2026-HD36441, CLEANSTART-2026-KK56976, CLEANSTART-2026-OB90229, CLEANSTART-2026-ON00136, CLEANSTART-2026-PP78809, CLEANSTART-2026-PZ72315, CLEANSTART-2026-QZ41346, CLEANSTART-2026-SN07875, CLSA-2026-1784624635, CLSA-2026-1785380784, DEBIAN-CVE-2026-49844, ECHO-a29e-7cbe-3436, GHSA-qv9r-c865-cp47, MINI-238c-g2wh-2j7g, MINI-23xp-xrv7-vww4, MINI-256w-8p58-v884, MINI-2fjf-6f85-558x, MINI-2jgg-3mw3-hh2w, MINI-2mq5-jrg2-m4gr, MINI-34mq-hx63-c7q2, MINI-3pfm-3jgr-5wjj, MINI-3qw3-8qvc-27x8, MINI-3wmr-3jfm-qpm8, MINI-432m-8jhj-82m8, MINI-45qg-g8g6-m9cj, MINI-48hr-77xw-vf3v, MINI-4rxv-9p52-hv5v, MINI-52mx-ch5x-3f5g, MINI-52vj-r8w5-4w93, MINI-57rh-87vq-cwxq, MINI-5qhp-3j5v-6p2h, MINI-63w9-76fh-v255, MINI-64wr-28vc-887x, MINI-66xq-cqhc-v5vr, MINI-6h65-q9mj-9vf6, MINI-6jvh-pcfh-4r3j, MINI-6p88-4fq4-98fm, MINI-73jj-fv4h-w345, MINI-79g9-mw5c-mp3r, MINI-7vr6-r3f6-f69c, MINI-7wrr-7h8w-vwg8, MINI-7xf2-xvrm-h99m, MINI-83gw-7wpq-j8g4, MINI-877w-vq26-c5g3, MINI-8cqm-c3qm-3rhg, MINI-8wcp-r56r-c82f, MINI-9346-rggg-98g7, MINI-94jj-2m44-35cc, MINI-9p27-vhmr-m23r, MINI-9v9q-v4x7-87mx, MINI-c44q-h7p4-wc3h, MINI-c4wm-5q29-wh34, MINI-c99r-25f7-6vhw, MINI-cx5f-v4h5-q5vv, MINI-f594-7xr6-m277, MINI-f6xr-wg9x-cvw9, MINI-f89m-qqg4-h34m, MINI-fqpm-69p8-9m4v, MINI-frqp-7wjq-vf8f, MINI-fwph-qrpw-583g, MINI-gc54-ph5x-35ph, MINI-hc7q-mg24-wxpm, MINI-hcc6-c977-9wqv, MINI-hg96-prxg-3w23, MINI-hhxj-jx4f-vjvp, MINI-hv23-39q5-hw9v, MINI-jfj5-723m-7q6p, MINI-jgpx-42mf-92q7, MINI-jjc5-w9mf-6m6q, MINI-jq4x-3pv2-x8r3, MINI-jxh3-h7hq-9wcv, MINI-m292-x845-hgwj, MINI-m5rv-3p2w-hrvv, MINI-m7hg-3jx5-fwgc, MINI-mgq9-p675-87ch, MINI-mvvx-ff6r-8j5m, MINI-mxjc-w329-v6pm, MINI-p3j7-wvx7-x6m4, MINI-p8hf-wgrv-hhqr, MINI-qgfx-wv77-26fw, MINI-qgqq-rxcg-hh5x, MINI-qvw9-73wp-w9v6, MINI-rcwc-wmr4-xx4w, MINI-rg9p-8p33-9vq9, MINI-rp5f-m5x4-3h7j, MINI-rr42-967m-c86h, MINI-v23f-2jhh-2242, MINI-v9c3-5hw7-xvrg, MINI-w24p-q68p-34cg, MINI-w2gq-2phx-mvpp, MINI-w7cf-29jw-7mjg, MINI-w8h8-6mxm-9hgf, MINI-wf6g-wvjh-h6wp, MINI-wffc-vfcg-5qjv, MINI-wj3v-qw43-pgjv, MINI-wr9h-x8hp-m3fm, MINI-x544-f4jg-6rrf, MINI-xf47-rfp8-7g3m, MINI-xf7j-4833-fp28, MINI-xfp2-vg72-fv49, MINI-xwhc-hgvr-7m6r, UBUNTU-CVE-2026-49844

## What is CVE-2026-49844?

CVE-2026-49844 is a medium-severity vulnerability in Apache Log4j API, published on 10 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-116 (Improper Encoding or Escaping of Output)

## Which versions are affected by CVE-2026-49844?

4 open source packages ship an affected version, including org.apache.logging.log4j:log4j-api. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.logging.log4j:log4j-api` | Maven | From 2.13.1 | 2.25.5 |
| `org.apache.logging.log4j:log4j-api` | Maven | From 2.13.1 | 2.25.5 |
| `org.apache.logging.log4j:log4j-api` | Maven | From 2.26.0 | 2.26.1 |
| `org.apache.logging.log4j:log4j-api` | Maven | From 2.26.0 | 2.26.1 |

Products: Apache Log4j.

## How do I fix CVE-2026-49844?

Upgrade org.apache.logging.log4j:log4j-api to a fixed version for your release line: 2.25.5 or 2.26.1.

## Is CVE-2026-49844 being exploited?

There is no known exploitation of CVE-2026-49844 in the wild and no public exploit code.

Public exploit code:

- log4j 2025/2026 年 7 条「配置静默失效」CVE 自查:按 CVE×模块 判定 4 个模块,结构化解析 log4j2 配置做 applicability 降噪,并算出该升到哪个版本才一次到位(6 条写 2.25.4,但有一条要 2.25.5,而它 Dependabot 报不出来) CVE-2026-49844 / CVE-2026-34477 (github_poc): https://github.com/xiaoqiMikko/log4j-check

## Other vulnerabilities in Apache Log4j API

- [CVE-2021-44228](https://insights.sbomify.com/CVE-2021-44228/): Apache Log4j2 Remote Code Execution (critical 10.0, exploited in the wild)
- [CVE-2021-45046](https://insights.sbomify.com/CVE-2021-45046/): Apache Log4j2 Deserialization of Untrusted Data (critical 9.0, exploited in the wild)
- [CVE-2022-23305](https://insights.sbomify.com/CVE-2022-23305/): SQL injection in JDBC Appender in Apache Log4j V1 (critical 9.8)
- [CVE-2017-5645](https://insights.sbomify.com/CVE-2017-5645/): Deserialization of Untrusted Data in Log4j (critical 9.8)
- [CVE-2022-23302](https://insights.sbomify.com/CVE-2022-23302/): Deserialization of untrusted data in JMSSink in Apache Log4j 1.x (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-49844 and fix it if it is affected.

What it is: CVE-2026-49844 is a medium-severity vulnerability in Apache Log4j API, published on 10 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-49844 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.logging.log4j:log4j-api (Maven): affected from 2.13.1; fixed in 2.25.5
- org.apache.logging.log4j:log4j-api (Maven): affected from 2.13.1; fixed in 2.25.5
- org.apache.logging.log4j:log4j-api (Maven): affected from 2.26.0; fixed in 2.26.1
- org.apache.logging.log4j:log4j-api (Maven): affected from 2.26.0; fixed in 2.26.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-49844/ (Markdown: https://insights.sbomify.com/CVE-2026-49844/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-49844
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-49844
- OSV: https://osv.dev/vulnerability/CVE-2026-49844

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-49844/
Summaries are generated and may contain mistakes; the official description above is the record.
