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?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « 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- 2021-04-1508:15CVE publishedNVD
- 2023-10-1414:56Listed as exploited by GCVEGCVE
- 2023-10-1414:56Exploitation first reportedGCVE
Observed activity
isMalicious corpus · updated 2026-11-03 21:37 UTCBlock 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| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 5.7 | ≥ 5.7.0, < 5.7.1 | 5.7.1 | NVD · OSV |
| 5.x | ≥ 5.4.0, < 5.6.3 | 5.6.3 | OSV |
| 5.x | ≥ 5.4.0, < 5.6.2 | 5.6.2 | NVD |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Fix
- Update Apache tapestry to 5.7.1 · 5.6.3 · 5.6.2
Advisories and patches
- lists.apache.orgVendor Advisory
Detection
read 2026-11-03 22:42 UTC- Nuclei template
- available ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof-of-concept repositories
- 4 repositories, unverifiedkahla-sec/CVE-2021-27850_POCdorkerdevil/CVE-2021-27850_POCOvi3/CVE_2021_27850_POCnovysodope/CVE-2021-27850 PoC-in-GitHub
- Metasploit modules
- 1 moduleauxiliary/gather/cve_2021_27850_apache_tapestry_hmac_keyrank: normalModule metadata: Metasploit Framework, © Rapid7, Inc., BSD-3-Clause. Metasploit Framework
Sources
- GCVEexploitation2023-10-14
- NVDCVSS 3.19.8read 2026-10-23
- NVDCVSS 2.010read 2026-10-23
- CNAweakness (CWE)CWE-200, CWE-502known since 2026-10-23
- NVDweakness (CWE)CWE-502read 2026-10-23
- FIRST EPSSEPSS score93.6 %read 2026-11-03
- PoC-in-GitHubproof of concept4read 2026-11-03
- ProjectDiscoverydetectionread 2026-11-03
- Metasploit FrameworkMetasploit modules1known since 2026-11-01
- OSVaffected packages—
- GitHub AdvisoriesadvisoryCRITICAL2021-04-19
Identifiers
- EUVD-2021-1359same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-mj8x-cpr8-x39hsame flawGitHub Advisory Database · CC-BY-4.0
- auxiliary/gather/cve_2021_27850_apache_tapestry_hmac_keyexploit moduleMetasploit Framework © Rapid7 · BSD-3-Clause
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?
Is CVE-2021-27850 actively exploited?
What is the CVSS score for CVE-2021-27850?
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
Go further
- For a threat intelligence platform: malware, C2 and ransomware indicators over STIX/TAXII.
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GCVE · GCVE dump terms (preserve source attribution)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-mj8x-cpr8-x39h
- Metasploit Framework · BSD-3-Clause
- Nuclei templates · MIT
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- PoC-in-GitHub · CC0-1.0