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

Check todayDenial of service over the network, no login needed.
7.5HIGH

Key Information:

Vendor

Apache

CVE ID
CVE ID:
CVE-2022-31781
Vendor
CVE Published:
13 July 2022
Fixed in
Fixed in:
5.8.1

Timeline

  • Vulnerability published

  • Vulnerability Reserved

How risky is it?

  • Yes: Works over the network, no login needed
  • No: No public exploit yet
  • No: Not on CISA's exploited list
  • No: No ransomware use seen

Our verdict

Check today

Find out if you're affected. If you are, patch.

What to do

1Update to a fixed version
Apache Tapestry below 5.8.1 is vulnerable
Install Apache Tapestry 5.8.1 or later
2Can't patch yet? Reduce exposure

It can be reached over the network, so limit who can reach Apache Tapestry. Block it from the internet, allow only trusted hosts or a VPN, and turn off the affected feature if you don't use it, until you can update.

3Why it's rated "Check today"
  • It can be exploited remotely without credentials.
  • Its CVSS severity is high (7.5).

What is CVE-2022-31781?

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.

References

Key Exchange Vulnerability in Apache Tomcat

CVE-2026-133325
ApacheApache Tomcat😄👾9.8CRITICAL

Improper Exception Management in Apache Tomcat Affects Multiple Versions

CVE-2026-116561
ApacheApache Tomcat😄9.1CRITICAL

Deserialization Vulnerability in Apache Roller Affects Multiple Versions

CVE-2026-129448
ApacheApache Roller😄👾9.8CRITICAL
View more Apache vulnerabilities...

Facts on this page come from the sources listed above; the writeup is AI-assisted. How we rate vulnerabilities · Report a correction

CVSS V3.1

Score:
7.5
Severity:
HIGH
Confidentiality:
None
Integrity:
None
Availability:
None
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Credit

CodeQL team members [@atorralba (Tony Torralba)](https://github.com/atorralba) and [@joefarebrother (Joseph Farebrother)](https://github.com/joefarebrother).
.