CVE-2026-34481

Source
https://cve.org/CVERecord?id=CVE-2026-34481
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-34481.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-34481
Aliases
Downstream
Related
Published
2026-04-10T15:43:00.100Z
Modified
2026-07-17T21:01:58.759353001Z
Severity
  • 6.3 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N CVSS Calculator
Summary
Apache Log4j JSON Template Layout: Improper serialization of non-finite floating-point values in JsonTemplateLayout
Details

Apache Log4j's JsonTemplateLayout https://logging.apache.org/log4j/2.x/manual/json-template-layout.html , in versions up to and including 2.25.3, produces invalid JSON output when log events contain non-finite floating-point values (NaN, Infinity, or -Infinity), which are prohibited by RFC 8259. This may cause downstream log processing systems to reject or fail to index affected records.

An attacker can exploit this issue only if both of the following conditions are met:

  • The application uses JsonTemplateLayout.
  • The application logs a MapMessage, or logs an object directly (e.g., via Logger.info(Object), which wraps it in an ObjectMessage), where the message contains an attacker-controlled floating-point value.

Users are advised to upgrade to Apache Log4j JSON Template Layout 2.25.4, which corrects this issue.

Note: The fix released in version 2.25.4 did not cover all affected code paths. CVE-2026-49844 was assigned to the remaining issue, which concerns the MapMessage.asJson() serialization in Apache Log4j API and is fixed in versions 2.25.5 and 2.26.1.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/34xxx/CVE-2026-34481.json",
    "cna_assigner": "apache",
    "cwe_ids": [
        "CWE-116"
    ]
}
References

Affected packages

Git / github.com/apache/logging-log4j2

Affected ranges

Type
GIT
Repo
https://github.com/apache/logging-log4j2
Events
Database specific
{
    "source": [
        "CPE_RANGE",
        "CPE_STRING"
    ],
    "cpe": [
        "cpe:2.3:a:apache:log4j:*:*:*:*:*:*:*:*",
        "cpe:2.3:a:apache:log4j:3.0.0:alpha1:*:*:*:*:*:*",
        "cpe:2.3:a:apache:log4j:3.0.0:beta1:*:*:*:*:*:*",
        "cpe:2.3:a:apache:log4j:3.0.0:beta2:*:*:*:*:*:*",
        "cpe:2.3:a:apache:log4j:3.0.0:beta3:*:*:*:*:*:*"
    ],
    "extracted_events": [
        {
            "introduced": "2.14.0"
        },
        {
            "fixed": "2.25.4"
        },
        {
            "introduced": "3.0.0-alpha1"
        },
        {
            "last_affected": "3.0.0-alpha1"
        },
        {
            "introduced": "3.0.0-beta1"
        },
        {
            "last_affected": "3.0.0-beta1"
        },
        {
            "introduced": "3.0.0-beta2"
        },
        {
            "last_affected": "3.0.0-beta2"
        },
        {
            "introduced": "3.0.0-beta3"
        },
        {
            "last_affected": "3.0.0-beta3"
        }
    ]
}

Affected versions

3.*
3.0.0-alpha1
3.0.0-beta1
3.0.0-beta2
3.0.0-beta3
log4j-2.*
log4j-2.14.0-rc1
log4j-2.14.1-rc1
log4j-2.15.0-rc1
log4j-2.15.0-rc2
log4j-2.15.1-rc1
log4j-2.16.0-rc1
log4j-2.17.0-rc1
log4j-2.17.1-rc1
log4j-2.17.2-rc1
log4j-2.18.0-rc1
log4j-2.19.0-rc1
log4j-2.19.0-rc2
log4j-2.20.0-rc1
rel/2.*
rel/2.14.0
rel/2.14.1
rel/2.15.0
rel/2.16.0
rel/2.17.0
rel/2.17.1
rel/2.17.2
rel/2.18.0
rel/2.19.0
rel/2.20.0
rel/2.25.0
rel/2.25.1
rel/2.25.2
rel/2.25.3

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-34481.json"