Apache Log4j API's JsonTemplateLayout message resolver (and any consumer of MapMessage.asJson()) emits bare NaN/Infinity/-Infinity tokens when a MapMessage carries a non-finite floating-point value, producing output that violates RFC 8259 and is not valid JSON. This is not remote code execution and there is no public exploit, PoC, or KEV/EPSS signal — the practical impact is corrupted log records that can break downstream JSON parsers, including SIEM ingestion, log analytics, and any AI-assisted anomaly-detection pipeline that expects well-formed JSON events. Blast radius is proportional to how widely you rely on JsonTemplateLayout's message resolver across JVM-based services (a very common pattern in enterprise Java stacks, including MLOps and data pipelines built on the JVM). Upgrade org.apache.logging.log4j:log4j-api to 2.25.5 or 2.26.1; until patched, monitor log ingestion pipelines for parse failures on fields that echo user- or model-derived numeric values (confidence scores, anomaly scores, metrics) that could go non-finite.
What is the risk?
Low-to-moderate risk. The defect (CWE-116, improper encoding) causes malformed JSON output rather than any memory-safety, injection, or authentication issue — there is no code execution or data exfiltration path. Exploitability is trivial for an attacker who can influence a floating-point value that ends up in a MapMessage logged through JsonTemplateLayout's message resolver, but the payoff is limited to breaking or corrupting the resulting log record and any tooling that parses it strictly as JSON. No CVSS vector, EPSS score, CISA KEV listing, or public exploit/scanner exists at time of publication, and severity is rated medium by the vendor. The real-world risk is concentrated in environments where log integrity feeds compliance evidence or automated detection logic.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Microsoft APM | maven | >= 2.13.1, < 2.25.5 | 2.25.5 |
| org.apache.logging.log4j:log4j-api | — | — | No patch |
How severe is it?
What should I do?
1 step-
Upgrade org.apache.logging.log4j:log4j-api to 2.25.5 or 2.26.1, both of which emit RFC 8259-compliant JSON for non-finite values. Where immediate upgrade isn't possible, validate/sanitize numeric fields (reject or coerce NaN/Infinity to null or a sentinel string) before they reach MapMessage logging, especially for fields derived from model outputs or external input. Add log-pipeline health checks that alert on JSON parse failures in Log4j-sourced streams, since a spike could indicate either this defect firing or an attacker deliberately probing for it. Track org.apache.logging.log4j:log4j-api as a dependency across JVM services and confirm patched versions via SBOM/dependency scanning.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-49844?
Apache Log4j API's JsonTemplateLayout message resolver (and any consumer of MapMessage.asJson()) emits bare NaN/Infinity/-Infinity tokens when a MapMessage carries a non-finite floating-point value, producing output that violates RFC 8259 and is not valid JSON. This is not remote code execution and there is no public exploit, PoC, or KEV/EPSS signal — the practical impact is corrupted log records that can break downstream JSON parsers, including SIEM ingestion, log analytics, and any AI-assisted anomaly-detection pipeline that expects well-formed JSON events. Blast radius is proportional to how widely you rely on JsonTemplateLayout's message resolver across JVM-based services (a very common pattern in enterprise Java stacks, including MLOps and data pipelines built on the JVM). Upgrade org.apache.logging.log4j:log4j-api to 2.25.5 or 2.26.1; until patched, monitor log ingestion pipelines for parse failures on fields that echo user- or model-derived numeric values (confidence scores, anomaly scores, metrics) that could go non-finite.
Is CVE-2026-49844 actively exploited?
No confirmed active exploitation of CVE-2026-49844 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-49844?
Upgrade org.apache.logging.log4j:log4j-api to 2.25.5 or 2.26.1, both of which emit RFC 8259-compliant JSON for non-finite values. Where immediate upgrade isn't possible, validate/sanitize numeric fields (reject or coerce NaN/Infinity to null or a sentinel string) before they reach MapMessage logging, especially for fields derived from model outputs or external input. Add log-pipeline health checks that alert on JSON parse failures in Log4j-sourced streams, since a spike could indicate either this defect firing or an attacker deliberately probing for it. Track org.apache.logging.log4j:log4j-api as a dependency across JVM services and confirm patched versions via SBOM/dependency scanning.
What systems are affected by CVE-2026-49844?
This vulnerability affects the following AI/ML architecture patterns: model serving (JVM-based inference services), MLOps/observability logging pipelines, SIEM and log-analytics ingestion feeding AI-assisted detection.
What is the CVSS score for CVE-2026-49844?
No CVSS score has been assigned yet.
What is the AI security impact?
Affected AI Architectures
Compliance Controls Affected
What are the technical details?
Original Advisory
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.
Exploitation Scenario
An adversary identifies a JVM-based service (e.g., a model-serving API or MLOps component) that logs a MapMessage containing a numeric field they can influence — for example, a model confidence score, latency metric, or telemetry value submitted via an API parameter. By supplying a value that resolves to NaN or Infinity (e.g., via a division-by-zero condition or an out-of-range input), the attacker causes JsonTemplateLayout's message resolver to emit a bare NaN/Infinity token in the log's JSON payload. This corrupts the log record, potentially breaking the downstream log ingestion pipeline or SIEM parser, disrupting security monitoring, or — in more sophisticated cases — being used defensively by an attacker to blind automated detection tooling that depends on parsing that log stream, effectively masking other malicious activity occurring around the same event.
Weaknesses (CWE)
CWE-116 Improper Encoding or Escaping of Output
Primary
CWE-116 Improper Encoding or Escaping of Output CWE-116 — Improper Encoding or Escaping of Output: The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using the ESAPI Encoding control [REF-45] or a similar tool, library, or framework. These will help the programmer encode outputs in a manner less prone to error. Alternately, use built-in functions, but consider using wrappers in case those functions are discovered to have a vulnerability.
- [Architecture and Design] If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated. For example, stored procedures can enforce database query structure and reduce the likelihood of SQL injection.
Source: MITRE CWE corpus.
References
- github.com/apache/logging-log4j2/pull/4163 patch
- logging.apache.org/cyclonedx/vdr.xml vendor-advisory
- logging.apache.org/security.html vendor-advisory
- github.com/advisories/GHSA-qv9r-c865-cp47
- github.com/apache/logging-log4j2/commit/19edb23e162d6c728a8c2221a240037d389ed300
- github.com/apache/logging-log4j2/commit/feadf8eb0b4acb6ddfa4c0ab2bbc6d88b8e12d82
- github.com/apache/logging-log4j2/releases/tag/rel/2.25.5
- github.com/apache/logging-log4j2/releases/tag/rel/2.26.1
- nvd.nist.gov/vuln/detail/CVE-2026-49844
Timeline
Related Vulnerabilities
CVE-2026-46858 9.1 Oracle APM: unauthenticated write/DoS via JVM Diagnostics
Same package: apm CVE-2026-57947 8.5 Pinpoint APM: SSRF via alarm webhook registration
Same package: apm CVE-2026-45539 7.4 Microsoft APM: symlink attack leaks host files in agent deps
Same package: apm CVE-2026-57948 6.8 Pinpoint: insecure JWT cookie enables session hijacking
Same package: apm CVE-2026-49835 5.9 Sigstore TSA: unbounded metrics label DoS
Same package: apm