← Back to CVE Explorer

CVE-2026-49844

Full vulnerability record from the local CVENow database.

Description

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.

Severity
MEDIUM
CVSS score
6.3 (v4.0)
Vulnerability status
Analyzed
Source identifier
Published
2026-07-10 22:16:42.540000
Last modified
2026-10-25 15:10:00.147000
View original CVE JSON
{
  "id": "CVE-2026-49844",
  "sourceIdentifier": "[email protected]",
  "published": "2026-07-10T22:16:42.540",
  "lastModified": "2026-10-25T15:10:00.147",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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.\n\nThe 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.\n\nThe defect is reachable only when both of the following conditions hold:\n\n  *  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\"}).\n  *  The application logs a MapMessage that contains an attacker-controlled floating-point value.\n\n\nAn 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.\n\nUsers 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."
    },
    {
      "lang": "es",
      "value": "La codificación incorrecta de valores de punto flotante no finitos durante la serialización JSON de MapMessage en la API de Apache Log4j produce una salida que no es JSON válido. Este problema afecta a las versiones de la API de Apache Log4j 2.13.1 a 2.25.4 y a la versión 2.26.0.\n\nLa corrección para CVE-2026-34481 no cubrió todas las rutas de código: cuando un MapMessage contiene un valor IEEE 754 no finito (NaN, Infinity o -Infinity), MapMessage.asJson() emite el token desnudo correspondiente. RFC 8259 no permite estos tokens, por lo que un analizador conforme rechaza el documento resultante.\n\nEl defecto es alcanzable solo cuando se cumplen ambas de las siguientes condiciones:\n\n  *  La aplicación utiliza el resolvedor de mensajes HTTPS://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-template-resolver-message de JsonTemplateLayout o cualquier otro layout que dependa de MapMessage.asJson() o MapMessage.getFormattedMessage(new String[]{’JSON’}).\n  *  La aplicación registra un MapMessage que contiene un valor de punto flotante controlado por el atacante.\n\nUn atacante que puede suministrar un valor no finito puede hacer que el layout afectado emita JSON malformado, lo que puede corromper el registro de log adjunto o interrumpir la ingesta y el análisis de logs posteriores.\n\nSe aconseja a los usuarios actualizar a Apache Log4j API 2.25.5 o 2.26.1, ambas de las cuales emiten JSON compatible con RFC 8259 para valores no finitos."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "Apache Software Foundation",
          "product": "Apache Log4j API",
          "defaultStatus": "unaffected",
          "collectionURL": "https://repo.maven.apache.org/maven2",
          "packageName": "org.apache.logging.log4j:log4j-api",
          "cpes": [
            "cpe:2.3:a:apache:log4j_api:*:*:*:*:*:*:*:*"
          ],
          "packageURL": "pkg:maven/org.apache.logging.log4j/log4j-api",
          "versions": [
            {
              "version": "2.13.1",
              "lessThan": "2.25.5",
              "versionType": "maven",
              "status": "affected"
            },
            {
              "version": "2.26.0",
              "lessThan": "2.26.1",
              "versionType": "maven",
              "status": "affected"
            },
            {
              "version": "3.0.0-alpha1",
              "lessThanOrEqual": "3.0.0-beta2",
              "versionType": "maven",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV40": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "4.0",
          "vectorString": "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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
          "baseScore": 6.3,
          "baseSeverity": "MEDIUM",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "attackRequirements": "PRESENT",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "vulnConfidentialityImpact": "NONE",
          "vulnIntegrityImpact": "NONE",
          "vulnAvailabilityImpact": "NONE",
          "subConfidentialityImpact": "NONE",
          "subIntegrityImpact": "LOW",
          "subAvailabilityImpact": "NONE",
          "exploitMaturity": "NOT_DEFINED",
          "confidentialityRequirement": "NOT_DEFINED",
          "integrityRequirement": "NOT_DEFINED",
          "availabilityRequirement": "NOT_DEFINED",
          "modifiedAttackVector": "NOT_DEFINED",
          "modifiedAttackComplexity": "NOT_DEFINED",
          "modifiedAttackRequirements": "NOT_DEFINED",
          "modifiedPrivilegesRequired": "NOT_DEFINED",
          "modifiedUserInteraction": "NOT_DEFINED",
          "modifiedVulnConfidentialityImpact": "NOT_DEFINED",
          "modifiedVulnIntegrityImpact": "NOT_DEFINED",
          "modifiedVulnAvailabilityImpact": "NOT_DEFINED",
          "modifiedSubConfidentialityImpact": "NOT_DEFINED",
          "modifiedSubIntegrityImpact": "NOT_DEFINED",
          "modifiedSubAvailabilityImpact": "NOT_DEFINED",
          "Safety": "NOT_DEFINED",
          "Automatable": "NOT_DEFINED",
          "Recovery": "NOT_DEFINED",
          "valueDensity": "NOT_DEFINED",
          "vulnerabilityResponseEffort": "NOT_DEFINED",
          "providerUrgency": "NOT_DEFINED"
        }
      }
    ],
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Primary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N",
          "baseScore": 5.9,
          "baseSeverity": "MEDIUM",
          "attackVector": "NETWORK",
          "attackComplexity": "HIGH",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "HIGH",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 2.2,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-07-14T13:56:31.652710Z",
          "id": "CVE-2026-49844",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-116"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:apache:log4j:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "2.13.1",
              "versionEndExcluding": "2.25.5",
              "matchCriteriaId": "12E4C571-03B3-4E5D-9DC8-6384F942F8F0"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:apache:log4j:2.26.0:*:*:*:*:*:*:*",
              "matchCriteriaId": "B90905D1-1381-4057-8AE1-726CF445974A"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:apache:log4j:3.0.0:alpha1:*:*:*:*:*:*",
              "matchCriteriaId": "5EE518C3-2F43-40FF-B754-C340B7003FC7"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:apache:log4j:3.0.0:alpha1_rc1:*:*:*:*:*:*",
              "matchCriteriaId": "6D2A01C1-D56C-4198-8ADB-11739F791E2B"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:apache:log4j:3.0.0:alpha1_rc2:*:*:*:*:*:*",
              "matchCriteriaId": "D6F8BD61-DD30-4D64-842C-850E5B117036"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:apache:log4j:3.0.0:beta1:*:*:*:*:*:*",
              "matchCriteriaId": "ED00C38D-27EA-489C-9A2B-3594ACA8A3C5"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:apache:log4j:3.0.0:beta2:*:*:*:*:*:*",
              "matchCriteriaId": "8794D719-1D90-4378-B48B-698EA40FBFB2"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/apache/logging-log4j2/pull/4163",
      "source": "[email protected]",
      "tags": [
        "Issue Tracking",
        "Patch"
      ]
    },
    {
      "url": "https://logging.apache.org/cyclonedx/vdr.xml",
      "source": "[email protected]",
      "tags": [
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-template-resolver-message",
      "source": "[email protected]",
      "tags": [
        "Product"
      ]
    },
    {
      "url": "https://logging.apache.org/security.html#CVE-2026-49844",
      "source": "[email protected]",
      "tags": [
        "Vendor Advisory"
      ]
    }
  ]
}