CVE-2021-27850 — tapestry-core
CRITICALCVE-2021-27850 is a critical-severity (CVSS 9.8) Information Exposure vulnerability in org.apache.tapestry:tapestry-core. 9 public exploit references exist, so weaponization risk is real. A fix is available for org.apache.tapestry:tapestry-core — see the affected versions and patch details below.
Remote code execution in Apache Tapestry
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-27850 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the ≥ 90% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
org.apache.tapestry:tapestry-core☕org.apache.tapestry:tapestry-coreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.tapestry:tapestry-core | ≥ 5.4.0&&< 5.6.3 | 5.6.3org.apache.tapestry:tapestry-core:5.6.3 |
| ☕Maven | org.apache.tapestry:tapestry-core | ≥ 5.7.0&&< 5.7.1 | 5.7.1org.apache.tapestry:tapestry-core:5.7.1 |
Affected Products
tapestryapacheResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
A critical unauthenticated remote code execution vulnerability was found…
A critical unauthenticated remote code execution vulnerability was found…
A critical unauthenticated remote code execution vulnerability was found…
A critical unauthenticated remote code execution vulnerability was found…
A critical unauthenticated remote code execution vulnerability was found…
A critical unauthenticated remote code execution vulnerability was found…
A critical unauthenticated remote code execution vulnerability was found…
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.tapestry:tapestry-core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.apache.tapestry:tapestry-core to 5.6.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-27850 is resolved across your whole dependency graph.
Workarounds
Do not deserialise data from untrusted sources: where the format allows it, restrict deserialisation to an explicit allowlist of expected types, and prefer a data-only format (JSON, Protobuf) over one that can reconstruct arbitrary objects until you can upgrade.
How to detect CVE-2021-27850
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2021-27850 -u https://target- Template
- Apache Tapestry - Remote Code Execution
- Severity
- critical
- Impact
- Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.
- Remediation
- Apply the latest security patches or updates provided by Apache to fix the vulnerability.
Template by ProjectDiscovery nuclei-templates (pdteam), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is CVE-2021-27850 in your dependencies?
Find it across Maven, including transitive dependencies.