Create CVE-2021-32618.yaml (#3546)

* Create CVE-2021-32618.yaml

* Update and rename CVE-2021-32618.yaml to cves/2021/CVE-2021-32618.yaml

* matcher update

Co-authored-by: Prince Chaddha <prince@projectdiscovery.io>
Co-authored-by: sandeep <sandeep@projectdiscovery.io>
patch-1
Roberto Nunes 2022-01-18 16:21:00 +09:00 committed by GitHub
parent a39245bf40
commit 2cadf76241
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,28 @@
id: CVE-2021-32618
info:
name: Flask Open Redirect
author: 0x_Akoko
severity: medium
description: There is code in FS to validate that the url specified in the next parameter is either relative OR has the same netloc (network location) as the requesting URL. This check utilizes Pythons urlsplit library. However many browsers are very lenient on the kind of URL they accept and 'fill in the blanks' when presented with a possibly incomplete URL. As a concrete example - setting http://login?next=\\\github.com will pass FS's relative URL check however many browsers will gladly convert this to http://example.com.
reference:
- https://github.com/Flask-Middleware/flask-security/security/advisories/GHSA-6qmf-fj6m-686c
- https://github.com/Flask-Middleware/flask-security/issues/486
- https://nvd.nist.gov/vuln/detail/CVE-2021-32618
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.10
cve-id: CVE-2021-32618
cwe-id: CWE-601
tags: cve,cve2021,redirect,flask
requests:
- method: GET
path:
- '{{BaseURL}}/login?next=\\\example.com'
matchers:
- type: regex
part: header
regex:
- '(?m)^(?:Location\s*?:\s*?)(?:https?:\/\/|\/\/|\/\\\\|\/\\)?(?:[a-zA-Z0-9\-_\.@]*)example\.com\/?(\/|[^.].*)?$' # https://regex101.com/r/ZDYhFh/1