Skip to main content
ExploitedNot in CISA KEV yetFix available

CVE-2021-27850

Exploitation confirmed. First attested on 2023-10-14 by GCVE · kevintel, GCVE · shadowserver.

  • Published2021-04-15
  • Fixed in5.7.1 · 5.6.3 · 5.6.2
  • WeaknessCWE-200 · CWE-502

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

A critical unauthenticated remote code execution vulnerability was found all recent versions of Apache Tapestry. The affected versions include 5.4.5, 5.5.0, 5.6.2 and 5.7.0. The vulnerability I have found is a bypass of the fix for CVE-2019-0195. Recap: Before the fix of CVE-2019-0195 it was possible to download arbitrary class files from the classpath by providing a crafted asset file URL. An attacker was able to download the file `AppModule.class` by requesting the URL `http://localhost:8080/assets/something/services/AppModule.class` which contains a HMAC secret key. The fix for that bug was a blacklist filter that checks if the URL ends with `.class`, `.properties` or `.xml`. Bypass: Unfortunately, the blacklist solution can simply be bypassed by appending a `/` at the end of the URL: `http://localhost:8080/assets/something/services/AppModule.class/` The slash is stripped after the blacklist check and the file `AppModule.class` is loaded into the response. This class usually contains the HMAC secret key which is used to sign serialized Java objects. With the knowledge of that key an attacker can sign a Java gadget chain that leads to RCE (e.g. CommonsBeanUtils1 from ysoserial). Solution for this vulnerability: * For Apache Tapestry 5.4.0 to 5.6.1, upgrade to 5.6.2 or later. * For Apache Tapestry 5.7.0, upgrade to 5.7.1 or later.

Timeline

dates in UTC
  1. 2021-04-1508:15CVE publishedNVD
  2. 2023-10-1414:56Listed as exploited by GCVEGCVE
  3. 2023-10-1414:56Exploitation first reportedGCVE

Observed activity

isMalicious corpus · updated 2026-11-03 21:37 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block these indicators
  • Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2021-27850?format=txt
  • CSV export: https://api.ismalicious.com/edl/cve/CVE-2021-27850?format=csv
  • TAXII collection of exploited CVEs
  • The EDL and CSV take an API key on the Pro plan.

Versions per branch

NVD · OSV
Apache tapestry
BranchAffectedFixed in
5.7≥ 5.7.0, < 5.7.15.7.1
5.x≥ 5.4.0, < 5.6.35.6.3
5.x≥ 5.4.0, < 5.6.25.6.2

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Fix

  1. Update Apache tapestry to 5.7.1 · 5.6.3 · 5.6.2

Advisories and patches

Detection

read 2026-11-03 22:42 UTC
Nuclei template
available
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Metasploit modules
1 moduleauxiliary/gather/cve_2021_27850_apache_tapestry_hmac_keyrank: normalModule metadata: Metasploit Framework, © Rapid7, Inc., BSD-3-Clause.
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
2021-04-15
Last Modified
2026-06-17
NVD status
Modified
GitHub Advisory
GHSA-mj8x-cpr8-x39h

Frequently asked questions

What is CVE-2021-27850?

A critical unauthenticated remote code execution vulnerability was found all recent versions of Apache Tapestry. The affected versions include 5.4.5, 5.5.0, 5.6.2 and 5.7.0. The vulnerability I have found is a bypass of the fix for CVE-2019-0195. Recap: Before the fix of CVE-2019-0195 it was possible to download arbitrary class files from the classpath by providing a crafted asset file URL. An attacker was able to download the file `AppModule.class` by requesting the URL `http://localhost:8080/assets/something/services/AppModule.class` which contains a HMAC secret key. The fix for that bug was a blacklist filter that checks if the URL ends with `.class`, `.properties` or `.xml`. Bypass: Unfortunately, the blacklist solution can simply be bypassed by appending a `/` at the end of the URL: `http://localhost:8080/assets/something/services/AppModule.class/` The slash is stripped after the blacklist check and the file `AppModule.class` is loaded into the response. This class usually contains the HMAC secret key which is used to sign serialized Java objects. With the knowledge of that key an attacker can sign a Java gadget chain that leads to RCE (e.g. CommonsBeanUtils1 from ysoserial). Solution for this vulnerability: * For Apache Tapestry 5.4.0 to 5.6.1, upgrade to 5.6.2 or later. * For Apache Tapestry 5.7.0, upgrade to 5.7.1 or later.

Is CVE-2021-27850 actively exploited?

Active exploitation of CVE-2021-27850 has not been confirmed. Its EPSS score was 93.6% on 2026-11-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-27850?

CVE-2021-27850 has a CVSS v3 base score of 9.8 (CRITICAL severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Hear about the next vulnerability in your software

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record