Intel

AIKIDO-2026-30627

log4j-api is vulnerable to Improper Output Encoding

CVE-2026-49844Published Jul 13, 2026
July 13, 2026

63

CVE Score

Medium

Improper Output Encoding

Are you affected? Scan for Free

TL;DR

The log4j-api MapMessageJsonFormatter serializes non-finite floating-point values by emitting bare NaN, Infinity, and -Infinity tokens through MapMessage.asJson(). RFC 8259 does not permit these tokens, so a MapMessage carrying an untrusted non-finite float produces JSON that conformant parsers reject. When an application uses JsonTemplateLayout or another layout that relies on MapMessage.asJson(), this can corrupt the enclosing log record and disrupt downstream log ingestion. The fix encodes non-finite values as quoted strings so the emitted document stays valid JSON.

How do I fix this?

Upgrade the org.apache.logging.log4j:log4j-api library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application logs a MapMessage with untrusted floating-point values through a layout that relies on MapMessage.asJson().

Package

Versions

2.13.1 - 2.25.4

Fixed in 2.25.5

2.26.0 - 2.26.0

Fixed in 2.26.1

Background info

log4j-api is vulnerable to Improper Output Encoding in versions 2.13.1 - 2.25.4 and 2.26.0 - 2.26.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea