{"id":"CVE-2026-34481","published":"2026-04-10T15:43:00Z","modified":"2026-07-11T04:55:42Z","title":"Apache Log4j JSON Template Layout: Improper serialization of non-finite floating-point values in JsonTemplateLayout","vendor":"Apache","product":"Apache Log4j JSON Template Layout","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.3,"severity":"MEDIUM","version":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00888,"percentile":0.57116,"provenance":"source"},"cwes":[{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://github.com/apache/logging-log4j2/pull/4080","tags":["patch"]},{"url":"https://logging.apache.org/security.html#CVE-2026-34481","tags":["vendor-advisory"]},{"url":"https://logging.apache.org/cyclonedx/vdr.xml","tags":["vendor-advisory"]},{"url":"https://logging.apache.org/log4j/2.x/manual/json-template-layout.html","tags":["related"]},{"url":"https://lists.apache.org/thread/n34zdv00gbkdbzt2rx9rf5mqz6lhopcv","tags":["vendor-advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2026/04/10/10","tags":[]}],"priority":{"score":15.8,"factors":[{"name":"EPSS percentile","points":11.42},{"name":"CVSS severity","points":4.41}]},"vendorSlug":"apache","affectedVersions":[{"vendor":"Apache Software Foundation","product":"Apache Log4j JSON Template Layout","versions":[">= 2.14.0, < 2.25.4",">= 3.0.0-alpha1, <= 3.0.0-beta3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-10T17:41:23.224802Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"org.apache.logging.log4j:log4j-layout-template-json","vulnerableRanges":[">=2.14.0, <2.25.4",">=3.0.0-alpha1, <=3.0.0-beta3"],"patched":["2.25.4"],"from":["GHSA-w35j-pv5h-q9q9"],"provenance":"source"}],"summary":{"text":"Apache Log4j JSON Template Layout (versions up to and including 2.25.3) produces invalid JSON output when log events contain non-finite floating-point values such as NaN, Infinity, or -Infinity, which RFC 8259 prohibits, potentially causing downstream log processing systems to reject or fail to index affected records. An attacker can trigger this only over the network with no authentication or user interaction, provided the application uses JsonTemplateLayout and logs a MapMessage or an object directly (such as via Logger.info(Object)) containing an attacker-controlled floating-point value.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:32:58Z"},"euvd":{"id":"EUVD-2026-21412","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-apache-log4j-json-template-layout-cve-2026-34481","children":[{"from":"CVE-2026-34481","to":"CVE-2026-49844","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"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.","from":"CVE.org","in":"CVE-2026-49844"}]}]}}