Skip to main content
VulnerabilityPublished Updated

CVE-2026-34481: Apache Log4j JSON Template Layout · Improper Encoding or Escaping of Output

Affects Apache Log4j JSON Template LayoutSource CVE Database V5

0
Compare

Mentioned vulnerabilities

Not known to be exploited · CVSS 6.3 Medium : upgrade to 2.25.4 when convenient.

Data as of 30 Oct 2026, 11:52 UTC

CVSS 4.0 base score
6.3Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.6% chance of exploitation in 30 days – higher than 52% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 2.25.4
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 10 Apr 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.

What to do

Upgrade Apache to 2.25.4.

Affected software

ProductAffectedFixed in
Apache Software FoundationApache Log4j JSON Template LayoutAffected
  • >=2.14.0 <2.25.4
  • >=3.0.0-alpha1 <=3.0.0-beta3
Fixed in
  • 2.25.4
MavenApache Software Foundation/org.apache.logging.log4j:log4j-layout-template-jsonpkg:maven/Apache Software Foundation/org.apache.logging.log4j:log4j-layout-template-jsonOther threatsAffected
  • >=2.14.0 <2.25.4
  • >=3.0.0-alpha1 <=3.0.0-beta3
Fixed in
  • 2.25.4
Mavenorg.apache.logging.log4j/log4j-layout-template-jsonpkg:maven/org.apache.logging.log4j/log4j-layout-template-jsonOther threatsAffected
  • =2.14.0
  • =3.0.0-alpha1
Fixed in–

CPE configurations (1)

  • cpe:2.3:a:apache:log4j_layout_template_json:*:*:*:*:*:*:*:*

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Users should upgrade Apache Log4j JSON Template Layout to version 2.25.4 or later to address this vulnerability. Additionally, related serialization issues are fixed in versions 2.25.5 and 2.26.1. No other mitigation steps are specified. Patch status is not explicitly confirmed in the advisory, but the vendor recommends upgrading to these fixed versions.

Description

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.

References

Community reviews

Loading reviews…