Impact
The bug occurs when MapMessage.asJson() writes non‑finite IEEE 754 values as raw tokens, violating RFC 8259 and being captured as CWE‑116. An attacker who can supply NaN, Infinity, or -Infinity into a MapMessage makes the JSON output syntactically invalid. A compliant parser will reject the record, potentially corrupting the surrounding log or halting log ingestion, which can disrupt downstream processing or audit trails.
Affected Systems
The vulnerability affects Apache Log4j API versions 2.13.1 through 2.25.4 and 2.26.0. It is limited to applications that use the JsonTemplateLayout message resolver or any layout that calls MapMessage.asJson() or MapMessage.getFormattedMessage(new String[JSON]). All other Log4j API users are not affected.
Risk and Exploitability
The CVSS score of 6.3 indicates moderate severity, while the EPSS score of < 1% translates to a very low probability of exploitation. The vulnerability is not listed in CISA’s KEV catalog. Exploitation requires that an attacker can insert a non‑finite value into a MapMessage and that the application serializes the message to JSON; therefore the attack vector is most likely application‑level input that ends up in logs. If achieved, the malformed JSON can cause downstream services to reject log entries, leading to loss of audit data or denial‑of‑service to log processing components.
OpenCVE Enrichment
Github GHSA