log4j-api is vulnerable to Improper Output Encoding
63
CVE Score
Medium
Improper Output Encoding
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.
Upgrade the org.apache.logging.log4j:log4j-api library to the patch version.
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().
2.13.1 - 2.25.4
Fixed in 2.25.52.26.0 - 2.26.0
Fixed in 2.26.1log4j-api is vulnerable to Improper Output Encoding in versions 2.13.1 - 2.25.4 and 2.26.0 - 2.26.0.
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.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.