← Back to CVE Explorer

CVE-2026-56017

Full vulnerability record from the local CVENow database.

Description

JavaScript::Minifier::XS versions before 0.16 for Perl crash with a NULL pointer dereference when the first meaningful token of the input is a slash. The regexp versus division disambiguator in JsTokenizeString (XS.xs) inspects the previous token's last byte to choose between a regexp literal and a division operator. When a slash is the first meaningful token, with the start of input or only whitespace and comments before it, there is no valid preceding token: the walk back over whitespace and comment nodes runs off the head of the node list to NULL, and the byte lookup reads through a NULL contents pointer at an underflowed length index. The following identifier check dereferences the same NULL pointer. The crash is reachable through the public minify() API, so input as small as a single slash byte crashes the calling process. A service that minifies untrusted or third-party JavaScript can be crashed by a remote request, causing denial of service.

Severity
HIGH
CVSS score
7.5 (v3.1)
Vulnerability status
Deferred
Source identifier
9b29abf9-4ab0-4765-b253-1875cd9b441e
Published
2026-06-29 20:17:39.570000
Last modified
2026-10-25 21:10:00.770000
View original CVE JSON
{
  "id": "CVE-2026-56017",
  "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
  "published": "2026-06-29T20:17:39.570",
  "lastModified": "2026-10-25T21:10:00.770",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "JavaScript::Minifier::XS versions before 0.16 for Perl crash with a NULL pointer dereference when the first meaningful token of the input is a slash.\n\nThe regexp versus division disambiguator in JsTokenizeString (XS.xs) inspects the previous token's last byte to choose between a regexp literal and a division operator. When a slash is the first meaningful token, with the start of input or only whitespace and comments before it, there is no valid preceding token: the walk back over whitespace and comment nodes runs off the head of the node list to NULL, and the byte lookup reads through a NULL contents pointer at an underflowed length index. The following identifier check dereferences the same NULL pointer.\n\nThe crash is reachable through the public minify() API, so input as small as a single slash byte crashes the calling process. A service that minifies untrusted or third-party JavaScript can be crashed by a remote request, causing denial of service."
    },
    {
      "lang": "es",
      "value": "Versiones de javascript_disabled: :Minifier::XS anteriores a la 0.16 para Perl fallan con una desreferenciación de puntero NULL cuando el primer token significativo de la entrada es una barra.\n\nEl desambiguador de regexp versus división en JsTokenizeString (XS.xs) inspecciona el último byte del token anterior para elegir entre un literal de regexp y un operador de división. Cuando una barra es el primer token significativo, con el inicio de la entrada o solo espacios en blanco y comentarios antes de ella, no hay un token precedente válido: el retroceso sobre los nodos de espacio en blanco y comentario se sale del inicio de la lista de nodos a NULL, y la búsqueda de bytes lee a través de un puntero de contenido NULL en un índice de longitud con desbordamiento inferior. La comprobación de identificador siguiente desreferencia el mismo puntero NULL.\n\nEl fallo es alcanzable a través de la API pública minify(), por lo que una entrada tan pequeña como un solo byte de barra falla el proceso de llamada. Un servicio que minifica JavaScript no confiable o de terceros puede ser bloqueado por una solicitud remota, causando denegación de servicio."
    }
  ],
  "affected": [
    {
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "affectedData": [
        {
          "vendor": "GTERMARS",
          "product": "JavaScript::Minifier::XS",
          "defaultStatus": "unaffected",
          "collectionURL": "https://cpan.org/modules",
          "packageName": "JavaScript-Minifier-XS",
          "programFiles": [
            "XS.xs"
          ],
          "programRoutines": [
            {
              "name": "JsTokenizeString"
            }
          ],
          "repo": "https://github.com/bleargh45/JavaScript-Minifier-XS",
          "versions": [
            {
              "version": "0",
              "lessThan": "0.16",
              "versionType": "custom",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 7.5,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-06-29T20:54:26.731930Z",
          "id": "CVE-2026-56017",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "yes"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-125"
        },
        {
          "lang": "en",
          "value": "CWE-476"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://metacpan.org/release/GTERMARS/JavaScript-Minifier-XS-0.16/changes",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    },
    {
      "url": "http://www.openwall.com/lists/oss-security/2026/06/29/16",
      "source": "af854a3a-2127-422b-91ae-364da2661108"
    }
  ]
}