Skip to content

[GHSA-qv9r-c865-cp47] Improper encoding of non-finite floating-point values...#8693

Open
ppkarwasz wants to merge 1 commit into
ppkarwasz/advisory-improvement-8693from
ppkarwasz-GHSA-qv9r-c865-cp47
Open

[GHSA-qv9r-c865-cp47] Improper encoding of non-finite floating-point values...#8693
ppkarwasz wants to merge 1 commit into
ppkarwasz/advisory-improvement-8693from
ppkarwasz-GHSA-qv9r-c865-cp47

Conversation

@ppkarwasz

Copy link
Copy Markdown

Updates

  • Affected products
  • CVSS v4
  • Description
  • Source code location
  • Summary

Comments
Restore data lost during MITRE -> NVD -> GitHub Advisories conversions.

Copilot AI review requested due to automatic review settings July 13, 2026 16:31
@github-actions github-actions Bot changed the base branch from main to ppkarwasz/advisory-improvement-8693 July 13, 2026 16:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores detailed metadata for the Apache Log4j API advisory.

Changes:

  • Adds affected Maven version ranges and summary.
  • Updates CVSS v4, description, and source reference.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

],
"details": "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.\n\nThe 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.\n\nThe defect is reachable only when both of the following conditions hold:\n\n * 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\"}).\n * The application logs a MapMessage that contains an attacker-controlled floating-point value.\n\n\nAn 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.\n\nUsers 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.",
"summary": "Apache Log4j API: Improper serialization of non-finite floating-point values in `MapMessage.asJson()`",
"details": "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.\n\nThe 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.\n\nThe defect is reachable only when both of the following conditions hold:\n\n * 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\"})`.\n * The application logs a `MapMessage` that contains an attacker-controlled floating-point value.\n\n\nAn 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.\n\nUsers 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.",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is worth cluttering the description with pre-release versions. Alpha and beta versions of Log4j are not meant to be used in production.

"url": "https://github.com/apache/logging-log4j2/pull/4163"
},
{
"type": "WEB",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what the UI chose to insert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants