GitHub Advisoryadvisory · PyPI

GHSA-fjq3-5pxw-4wj4 Cross-Site Request Forgery in Webargs

HIGH Published 2021-04-07 Modified 2024-11-19 Official page ↗
Aliases
CVE-2020-7965
Ecosystem
PyPI
Packages
webargs
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weaknesses
CWE-352
Reviewed
2021-03-29

Affected packages

• PyPI webargs: >= 5.0.0, < 5.5.3 → fixed in 5.5.3 • PyPI webargs: >= 6.0.0b1, < 6.0.0b4 → fixed in 6.0.0b4

Description

flaskparser.py in Webargs 5.x through 5.5.2 doesn't check that the Content-Type header is application/json when receiving JSON input. If the request body is valid JSON, it will accept it even if the content type is application/x-www-form-urlencoded. This allows for JSON POST requests to be made across domains, leading to CSRF.

Related

Alias · CVE (1)

  • CVE-2020-7965 flaskparser.py in Webargs 5.x through 5.5.2 doesn't check that the Content-Type header is application/json when receiving JSON input. vulnerability

Weakness · CWE (1)

  • CWE-352 Cross-Site Request Forgery weakness

References