# CVE-2020-7965: Cross-Site Request Forgery in Webargs

Source: https://junglewise.ai/threats/cve-2020-7965-cross-site-request-forgery-in-webargs  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-01-29  
License: CC BY 4.0 with a link back

CVE-2020-7965 · Severity: low · CVSS 3.1 · Published 2020-01-29

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.

Technologies: [webargs (PyPI)](https://junglewise.ai/threats/technologies/webargs). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2020-7965 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2020-7965 being exploited in the wild.

**How severe is CVE-2020-7965?** Low severity, with a CVSS score of 3.1, published 29 January 2020.

**Which products and versions are affected?** webargs (PyPI) ECOSYSTEM:introduced=5.0.0,fixed=5.5.3.

**Is there a fix for CVE-2020-7965?** Yes. webargs (PyPI): upgrade to 5.5.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2020-7965?** Check whether you run webargs (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- webargs (PyPI): upgrade to 5.5.3 or later

  ```sh
  pip install "webargs>=5.5.3"
  ```


## Affected products

- webargs (PyPI) ECOSYSTEM:introduced=5.0.0,fixed=5.5.3

## Identifiers

- CVE-2020-7965
- GHSA-fjq3-5pxw-4wj4
- PYSEC-2020-156

## Related threats

- [Webargs mishandles concurrent JSON parsing](https://junglewise.ai/threats/cve-2019-9710-webargs-mishandles-concurrent-json-parsing)
- [PYSEC-2019-69 - An issue was discovered in webargs before 5.1.3, as used with marshmallow and other products. JSON…](https://junglewise.ai/threats/pysec-2019-69-an-issue-was-discovered-in-webargs-before-5-1-3-as-used-f4bacbd0)
