CVE-2022-31781: Apache Tapestry 5.8.1 vulnerable to ReDoS via Content Types causing catastrophic backtracking
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.77868%
CWE
Published
7/14/2022
Updated
7/24/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| org.apache.tapestry:tapestry-core | maven | < 5.8.2 | 5.8.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the regex pattern in ContentType's constructor. The original pattern used '(; (param=value))' with an unbounded quantifier (), which is vulnerable to ReDoS via exponential backtracking. The commit 3c8d610 shows the fix was to limit parameters to {0,5} repetitions. The added test case demonstrates this by triggering a timeout with excessive parameters. Since the constructor directly processes input using this regex, it's the clear vulnerable entry point.