WaratekVRT Sign in

CVE-2021-27850 Apache Tapestry

Affected softwareApache Tapestry
Severity9.8 Critical CVSS 3.1 2 scores
Fixed in5.6.3, 5.7.1
WeaknessDeserialization of untrusted data (CWE-502)
Published15 Apr 2021
Updated17 Jun 2026

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.

CWE-200 · Information exposureCWE-922

Exploitation status

Exploited

Real-world exploitation reported by VulnCheck KEV. CISA has not confirmed it.

  • CISA KEV not listed
  • VulnCheck KEV listed Exploitation reported in the wild. 1 citation · honeypot sightings · 4 exploits · earliest 2023-12-03.
  • CISA Vulnrichment no assessment published
  • Indexed PoC 5 indexed Published artifacts you can open, in GitHub PoC, Nuclei; first seen 2021-06-25.
  • EPSS 94% chance in 30 days A model's forecast, not a report of exploitation. Higher than 99.8% of all scored CVEs.

VulnCheck KEV

Exploitation evidence from VulnCheck Known Exploited Vulnerabilities (VulnCheck KEV), used under VulnCheck's community terms. View CVE-2021-27850 in VulnCheck (free account).

EvidenceSourceDetailDate
Honeypot sighting Shadowserver honeypots Exploitation attempts seen on 625 days 2023-12-03 to 2026-11-11
Reported exploitation greynoise.io /blog/u-s-and-uk-warn-of-russian-cyber-threats-9-of-24-vulnerabilities-in-the-advisory-are-being-probed-right-now 2024-10-17
Exploit reference VulnCheck XDB a47314978e85 Exploit type: local 2021-06-26
Exploit reference VulnCheck XDB 1f38fe1766df Exploit type: initial-access 2021-07-02
Exploit reference VulnCheck XDB 4c3deb656f30 Exploit type: local 2023-12-21
Exploit reference VulnCheck XDB 93bb5020bd80 Exploit type: initial-access 2026-02-23

3 of these are GitHub repositories with fewer than 5 stars. They are listed for reference and don't count toward the exploitation status above.

IndexArtifactStarsFirst seen
GitHub PoC A Proof of concept for CVE-2021-27850 affecting Apache Tapestry and leading to unauthencticated remote code execution. 5 2021-06-25
GitHub PoC A Proof of concept for CVE-2021-27850 affecting Apache Tapestry and leading to unauthencticated remote code execution. 3 2021-06-26
GitHub PoC Apache Tapestry CVE-2021-27850 PoC 2 2021-07-02
GitHub PoC CVE-2021-27850 ysoserial 2022-07-07
Nuclei Apache Tapestry - Remote Code Execution

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

Decided by A vulnerability class already blocked by an ARMR security rule
Finding Protected by Waratek's ARMR deserialization security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's weakness is CWE-502: Deserialization of Untrusted Data.

How to mitigate CVE-2021-27850

Upgrade Apache Tapestry to a release that fixes it: 5.6.3 or 5.7.1. Until you can, Waratek RASP blocks exploitation with its deserialization and process rules. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

CVSS

9.8 CRITICAL v3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 2 metrics

We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.

VersionScoreBandVectorAssignerType
CVSS 3.1 9.8 CRITICAL CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H NVD Primary published
CVSS 2.0 10.0 none AV:N/AC:L/Au:N/C:C/I:C/A:C NVD Primary

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
org.apache.tapestry:tapestry-core 5.4.0 5.6.3 unbounded
org.apache.tapestry:tapestry-core 5.7.0 5.7.1 unbounded

Products and versions

2 products, 4 version entries
SourceVendorProductSchemeAffected versions
nvd apache tapestry generic ≥ 5.4.0 and < 5.6.2 · ≥ 5.7.0 and < 5.7.1
osv org.apache.tapestry tapestry-core generic ≥ 5.4.0 and < 5.6.3 · ≥ 5.7.0 and < 5.7.1

References

URLTags
https://issues.apache.org/jira/browse/TAP5-2663 WEB
https://lists.apache.org/thread.html/r237ff7f286bda31682c254550c1ebf92b0ec61329b32fbeb2d1c8751%40%3Cusers.tapestry.apache.org%3E WEB
https://security.netapp.com/advisory/ntap-20210528-0002 WEB
http://www.openwall.com/lists/oss-security/2021/04/15/1 WEB
https://security.netapp.com/advisory/ntap-20210528-0002/ Third Party Advisory

Timeline

Published2021-04-15By the CVE Program.
VulnCheck KEV: earliest evidence2023-12-03Date of the oldest evidence of exploitation in VulnCheck KEV's record. VulnCheck does not publish the date it listed the CVE.
NVD record modified2026-06-17NVD's own last-modified date for this record.
VulnCheck KEV: latest evidence2026-11-11Date of the newest report, exploit reference or honeypot sighting in VulnCheck KEV's record.