HighGHSA-227g-7cvv-6ff3CVE-2022-31781

Apache Tapestry 5.8.1 vulnerable to ReDoS via Content Types causing catastrophic backtracking

Published 14 Jul 2022 · Updated 16 Feb 2024

Is your project on an affected org.apache.tapestry:tapestry-core?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<5.8.2
Fixed in
5.8.2
Update to the fixed version for your release line, for example:mvn versions:use-dep-version -Dincludes=org.apache.tapestry:tapestry-core -DdepVersion=5.8.2 -DforceVersion=true

Details

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.

Is GHSA-227g-7cvv-6ff3 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected org.apache.tapestry:tapestry-core, and gives you the command that fixes it.

More advisories for org.apache.tapestry:tapestry-core

  • CriticalCVE-2022-46366Apache Tapestry allows deserialization of untrusted data · 2 Dec 2022
  • CriticalCVE-2019-0195Deserialization of Untrusted Data in Apache Tapestry · 24 May 2022
  • HighCVE-2014-1972Apache Tapestry Unsafe Object Storage · 13 May 2022
  • HighCVE-2021-30638Information Exposure in Apache Tapestry · 18 Mar 2022
  • MediumCVE-2020-13953Improper file downloads in Apache Tapestry · 10 Feb 2022
  • CriticalCVE-2021-27850Remote code execution in Apache Tapestry · 16 Jun 2021
All 9 advisories for org.apache.tapestry:tapestry-core

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.