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

High 8.8 Published Updated

Webargs library fails to validate Content-Type headers, allowing cross-domain JSON POST requests and enabling CSRF attacks.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2020-7965?

CVE-2020-7965 is a high-severity vulnerability in n/a, published on 29 Jan 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-352

Which versions are affected by CVE-2020-7965?

5 open source packages ship an affected version, including webargs. It affects 1 product.

PackageAffectedFixed in
webargs PyPIFrom 5.0.05.5.3
webargs PyPIFrom 5.0.05.5.3
webargs PyPIFrom 5.0.05.5.3
webargs PyPIFrom 6.0.0b16.0.0b4
webargs PyPIFrom 6.0.0b16.0.0b4

Products include Webargs Project Webargs.

How do I fix CVE-2020-7965?

Upgrade webargs to a fixed version for your release line: 5.5.3 or 6.0.0b4.

Is CVE-2020-7965 being exploited?

There is no known exploitation of CVE-2020-7965 in the wild and no public exploit code.

Sources

Also known as GHSA-fjq3-5pxw-4wj4, PYSEC-2020-156.

Is CVE-2020-7965 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free