{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-27850","id":"CVE-2021-27850","title":"Bypass of the fix for CVE-2019-0195","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 att","descriptionLong":"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.","published":"2021-04-15T07:40:11.000Z","updated":"2026-10-25T01:16:50.374558639Z","reserved":"2021-03-01T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"apache","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"2.0","score":10,"vector":"AV:N/AC:L/Au:N/C:C/I:C/A:C","rating":"critical","source":"NVD"}],"rating":"critical","products":["Apache Software Foundation Apache Tapestry"],"affectedProducts":[{"vendor":"Apache Software Foundation","product":"Apache Tapestry","defaultStatus":null,"versions":[{"status":"affected","version":"Apache Tapestry 5.5.0"},{"status":"affected","version":"Apache Tapestry 5.7.0"},{"lessThan":"Apache Tapestry 5.4.0*","status":"affected","version":"Apache Tapestry 5.4.5","versionType":"custom"},{"lessThan":"Apache Tapestry 5.6.0*","status":"affected","version":"Apache Tapestry 5.6.2","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"Maven","name":"org.apache.tapestry:tapestry-core","purl":"pkg:maven/org.apache.tapestry/tapestry-core","ranges":[">=5.4.0 <5.6.3",">=5.7.0 <5.7.1"],"fixed":["5.6.3","5.7.1"],"advisory":"GHSA-mj8x-cpr8-x39h"}],"cwes":["CWE-200","CWE-502","CWE-922"],"aliases":["GHSA-mj8x-cpr8-x39h"],"references":[{"url":"https://lists.apache.org/thread.html/r237ff7f286bda31682c254550c1ebf92b0ec61329b32fbeb2d1c8751%40%3Cusers.tapestry.apache.org%3E","tags":["x_refsource_MISC","x_transferred","Mailing List","Vendor Advisory","advisory","web"]},{"url":"http://www.openwall.com/lists/oss-security/2021/04/15/1","tags":["mailing-list","x_refsource_MLIST","x_transferred","Exploit","Mailing List","Third Party Advisory","evidence","web"]},{"url":"https://security.netapp.com/advisory/ntap-20210528-0002/","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27850","tags":["advisory"]},{"url":"https://issues.apache.org/jira/browse/TAP5-2663","tags":["web"]},{"url":"https://security.netapp.com/advisory/ntap-20210528-0002","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.9356,"epssPercentile":0.99845,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-27850","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27850","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-27850","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-mj8x-cpr8-x39h","ok":true,"note":"GHSA-mj8x-cpr8-x39h"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-27850","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":["EPSS 94% with CVSS 9.8"],"attention":null}