{"id":"CVE-2026-34481","aliases":["CVE-2026-34481","GHSA-w35j-pv5h-q9q9"],"related":[],"kind":"vulnerability","state":"published","title":"Apache Log4j JSON Template Layout: Improper serialization of non-finite floating-point values in JsonTemplateLayout","summary":"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.\n\nAn attacker can exploit this issue only if both of the following conditions are met:\n\n  *  The application uses JsonTemplateLayout.\n  *  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.\n\n\nUsers are advised to upgrade to Apache Log4j JSON Template Layout 2.25.4, which corrects this issue.\n\nNote: 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.\n\nAn attacker can exploit this issue only if both of the following conditions are met:\n\n  *  The application uses JsonTemplateLayout.\n  *  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.\n\n\nUsers are advised to upgrade to Apache Log4j JSON Template Layout 2.25.4, which corrects this issue.\n\nNote: 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.","source":"cvelist"},{"lang":"en","text":"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.\n\nAn attacker can exploit this issue only if both of the following conditions are met:\n\n  *  The application uses `JsonTemplateLayout`.\n  *  The application logs a `MapMessage` containing an attacker-controlled floating-point value.\n\nUsers are advised to upgrade to Apache Log4j JSON Template Layout 2.25.4, which corrects this issue.","format":"markdown","source":"ghsa"},{"lang":"es","text":"El JsonTemplateLayout de Apache Log4j https://logging.apache.org/log4j/2.x/manual/json-template-layout.html , en versiones hasta la 2.25.3 inclusive, produce una salida JSON no válida cuando los eventos de registro contienen valores de punto flotante no finitos (NaN, Infinity o -Infinity), los cuales están prohibidos por el RFC 8259. Esto puede hacer que los sistemas de procesamiento de registros posteriores rechacen o no puedan indexar los registros afectados.\n\nUn atacante puede explotar este problema solo si se cumplen las dos condiciones siguientes:\n\n  *  La aplicación utiliza JsonTemplateLayout.\n  *  La aplicación registra un MapMessage que contiene un valor de punto flotante controlado por el atacante.\n\nSe aconseja a los usuarios actualizar a Apache Log4j JSON Template Layout 2.25.4, que corrige este problema.","source":"nvd"}],"published":"2026-04-10T15:43:00.100Z","modified":"2026-10-26T22:10:00.163Z","severity":{"scorer":"apache","scheme":"CVSS:4.0","vector":"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","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"apache","scheme":"CVSS:4.0","vector":"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","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-116"],"affected":[{"ranges":[{"type":"maven","introduced":"2.14.0","fixed":"2.25.4","status":"affected"},{"type":"maven","introduced":"3.0.0-alpha1","lastAffected":"3.0.0-beta3","status":"affected"}],"vendor":"Apache Software Foundation","product":"Apache Log4j JSON Template Layout","package":"org.apache.logging.log4j:log4j-layout-template-json","cpe":"cpe:2.3:a:apache:log4j_layout_template_json:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.14.0","status":"affected","fixed":"2.25.4"}],"ecosystem":"Maven","package":"org.apache.logging.log4j:log4j-layout-template-json","purl":"pkg:maven/org.apache.logging.log4j/log4j-layout-template-json","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0-alpha1","status":"affected","lastAffected":"3.0.0-beta3"}],"ecosystem":"Maven","package":"org.apache.logging.log4j:log4j-layout-template-json","purl":"pkg:maven/org.apache.logging.log4j/log4j-layout-template-json","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.14.0","fixed":"2.25.4"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"}],"vendor":"apache","product":"log4j","cpe":"cpe:2.3:a:apache:log4j:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/apache/logging-log4j2/pull/4080","tags":["issue-tracking","patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://logging.apache.org/security.html#CVE-2026-34481","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://logging.apache.org/cyclonedx/vdr.xml","tags":["product","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://logging.apache.org/log4j/2.x/manual/json-template-layout.html","tags":["related","technical-description","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.apache.org/thread/n34zdv00gbkdbzt2rx9rf5mqz6lhopcv","tags":["mailing-list","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"http://www.openwall.com/lists/oss-security/2026/04/10/10","tags":["mailing-list","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34481","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/apache/logging-log4j2","tags":["package"],"sources":["ghsa"]}],"credits":["Ap4sh (Samy Medjahed) and Ethicxz (Eliott Laurie)"],"assigner":"apache","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-04-10T17:41:23.224Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-34481","url":"https://www.cve.org/CVERecord?id=CVE-2026-34481","licence":"CVE Terms of Use","modified":"2026-07-11T04:55:42.502Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w35j-pv5h-q9q9","url":"https://github.com/advisories/GHSA-w35j-pv5h-q9q9","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:03.622Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-34481","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34481","licence":"Public domain","modified":"2026-10-26T22:10:00.163Z"}],"updatedAt":"2026-11-25T22:59:18.501Z","epss":{"score":0.00717,"percentile":0.55008,"date":"2026-12-01T12:00:22.000Z"}}