Skip to content
Heist/ feed
Back to feed
Medium

apache-log4j2 — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-49844

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.

Products
apache-log4j2
Affected versions
2.10.0-1, 2.10.0-2, 2.10.0-2ubuntu0.1, 2.11.1-2, 2.11.2-1, 2.12.4-0ubuntu0.1, 2.13.3-1, 2.15.0-0.20.04.1, 2.15.0-1, 2.16.0-0.20.04.1, 2.16.0-1, 2.17.0-0.20.04.1, 2.17.0-1, 2.17.1-0.20.04.1, 2.17.1-1, 2.19.0-2, 2.19.0-2build1, 2.2-1, 2.4-1, 2.4-2, 2.4-2ubuntu0.1~esm1, 2.8.2-1, 2.8.2-2
Fixed versions
Not specified
CVEs
CVE-2026-49844
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 02:44 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-49844

core-osv · Original source

Published 10 Jul 2026, 22:16 UTC

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.

osv:UBUNTU-CVE-2026-49844

apache-log4j2

Fixed versions: Not specified

apache-log4j2

Fixed versions: Not specified

apache-log4j2

Fixed versions: Not specified

apache-log4j2

Fixed versions: Not specified

apache-log4j2

Fixed versions: Not specified

apache-log4j2

Fixed versions: Not specified

apache-log4j2

Fixed versions: Not specified

Complete source record
{
  "id": "b193965fdc88f266bc6751df95a5d96a8d7affe8ff97bae84affbee2393bd174",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-49844",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-49844",
    "summary": "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.",
    "evidence": "osv:UBUNTU-CVE-2026-49844",
    "products": [
      {
        "name": {
          "value": "apache-log4j2",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.2-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.4-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.4-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.4-2ubuntu0.1~esm1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "apache-log4j2",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.8.2-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.8.2-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.10.0-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.10.0-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.10.0-2ubuntu0.1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.12.4-0ubuntu0.1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "apache-log4j2",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.11.1-2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "2.11.2-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "2.15.0-0.20.04.1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "2.16.0-0.20.04.1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "2.17.0-0.20.04.1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "2.17.1-0.20.04.1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "apache-log4j2",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.13.3-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "2.15.0-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "2.16.0-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "2.17.0-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "2.17.1-1",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "apache-log4j2",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.19.0-2",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "apache-log4j2",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.19.0-2build1",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "apache-log4j2",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.19.0-2",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "2.19.0-2build1",
            "evidence": "/affected/6/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "UBUNTU-CVE-2026-49844",
      "aliases": [
        "UBUNTU-CVE-2026-49844"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "apache-log4j2",
            "purl": "pkg:deb/ubuntu/apache-log4j2?arch=source&distro=esm-apps%2Fxenial",
            "ecosystem": "Ubuntu:Pro:16.04:LTS"
          },
          "versions": [
            "2.2-1",
            "2.4-1",
            "2.4-2",
            "2.4-2ubuntu0.1~esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-49844.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "liblog4j2-java",
                "binary_version": "2.4-2ubuntu0.1~esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "apache-log4j2",
            "purl": "pkg:deb/ubuntu/apache-log4j2?arch=source&distro=bionic",
            "ecosystem": "Ubuntu:18.04:LTS"
          },
          "versions": [
            "2.8.2-1",
            "2.8.2-2",
            "2.10.0-1",
            "2.10.0-2",
            "2.10.0-2ubuntu0.1",
            "2.12.4-0ubuntu0.1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-49844.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "liblog4j2-java",
                "binary_version": "2.12.4-0ubuntu0.1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "apache-log4j2",
            "purl": "pkg:deb/ubuntu/apache-log4j2?arch=source&distro=focal",
            "ecosystem": "Ubuntu:20.04:LTS"
          },
          "versions": [
            "2.11.1-2",
            "2.11.2-1",
            "2.15.0-0.20.04.1",
            "2.16.0-0.20.04.1",
            "2.17.0-0.20.04.1",
            "2.17.1-0.20.04.1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-49844.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "liblog4j2-java",
                "binary_version": "2.17.1-0.20.04.1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "apache-log4j2",
            "purl": "pkg:deb/ubuntu/apache-log4j2?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "2.13.3-1",
            "2.15.0-1",
            "2.16.0-1",
            "2.17.0-1",
            "2.17.1-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-49844.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "liblog4j2-java",
                "binary_version": "2.17.1-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "apache-log4j2",
            "purl": "pkg:deb/ubuntu/apache-log4j2?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "2.19.0-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-49844.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "liblog4j2-java",
                "binary_version": "2.19.0-2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "apache-log4j2",
            "purl": "pkg:deb/ubuntu/apache-log4j2?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "2.19.0-2build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-49844.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "liblog4j2-java",
                "binary_version": "2.19.0-2build1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "apache-log4j2",
            "purl": "pkg:deb/ubuntu/apache-log4j2?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "2.19.0-2",
            "2.19.0-2build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-49844.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "liblog4j2-java",
                "binary_version": "2.19.0-2build1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:58:58.101840630Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-49844"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-49844",
        "https://www.cve.org/CVERecord?id=CVE-2026-49844",
        "https://logging.apache.org/security.html#CVE-2026-49844",
        "https://github.com/apache/logging-log4j2/pull/4163",
        "https://logging.apache.org/cyclonedx/vdr.xml",
        "https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-template-resolver-message"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-49844",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 359194,
  "published_at": "2026-07-10T22:16:00+00:00"
}