CVE-2022-31781
JSON

7.5high

Regular Expression Denial of Service (ReDoS) in ContentType.java. (GHSL-2022-022)

Severity
7.5high CVSS:3.1 by NVD
Exploit likelihood
1.97% (higher than 81% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
apache
Also known as
GHSA-227g-7cvv-6ff3

Description

Apache Tapestry up to version 5.8.1 is vulnerable to Regular Expression Denial of Service (ReDoS) in the way it handles Content Types. Specially crafted Content Types may cause catastrophic backtracking, taking exponential time to complete. Specifically, this is about the regular expression used on the parameter of the org.apache.tapestry5.http.ContentType class. Apache Tapestry 5.8.2 has a fix for this vulnerability. Notice the vulnerability cannot be triggered by web requests in Tapestry code alone. It would only happen if there's some non-Tapestry codepath passing some outside input to the ContentType class constructor.

Affected

Product or packageVersionsReported by
Apache Software Foundation Apache Tapestryfrom 5.8.1 before 5.8.1CVE List
org.apache.tapestry:tapestry-core (Maven)before 5.8.2GitHub Advisory Database
apache tapestrybefore 5.8.2NVD

All scores

GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

What each source says

CVE List

Apache Tapestry up to version 5.8.1 is vulnerable to Regular Expression Denial of Service (ReDoS) in the way it handles Content Types. Specially crafted Content Types may cause catastrophic backtracking, taking exponential time to complete. Specifically, this is about the regular expression used on the parameter of the org.apache.tapestry5.http.ContentType class. Apache Tapestry 5.8.2 has a fix for this vulnerability. Notice the vulnerability cannot be triggered by web requests in Tapestry code alone. It would only happen if there's some non-Tapestry codepath passing some outside input to the ContentType class constructor.

NVD (es)

Apache Tapestry versiones hasta 5.8.1 es vulnerable a una Denegación de Servicio por Expresión Regular (ReDoS) en la forma en que maneja los Tipos de Contenido. Los Tipos de Contenido especialmente diseñados pueden causar un retroceso catastrófico, tardando un tiempo exponencial en completarse. En concreto, esto es acerca de la expresión regular usada en el parámetro de la clase org.apache.tapestry5.http.ContentType. Apache Tapestry versión 5.8.2 presenta una corrección para esta vulnerabilidad. Obsérvese que la vulnerabilidad no puede ser desencadenada sólo por peticiones web en el código de Tapestry. Sólo ocurriría si se presenta algún codepath no Tapestry pasando alguna entrada externa al constructor de la clase ContentType

References

Sources

SourceRecordLicence
CVE ListCVE-2022-31781 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-227g-7cvv-6ff3 changed 2024-02-16CC-BY-4.0
NVDCVE-2022-31781 changed 2026-06-17Public domain