Cross-Site Request Forgery (CSRF) Affecting webargs package, versions [6.0.0b1,6.0.0b4)[,5.5.3)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.07% (34th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-Site Request Forgery (CSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-WEBARGS-564231
  • published1 Apr 2020
  • disclosed1 Apr 2020
  • creditUnknown

Introduced: 1 Apr 2020

CVE-2020-7965  (opens in a new tab)
CWE-352  (opens in a new tab)

How to fix?

Upgrade webargs to version 6.0.0b4, 5.5.3 or higher.

Overview

webargs is a python library for parsing and validating HTTP request objects, with built-in support for popular web frameworks, including Flask, Django, Bottle, Tornado, Pyramid, webapp2, Falcon, and aiohttp.

Affected versions of this package are vulnerable to Cross-Site Request Forgery (CSRF). Flaskparser.py does not 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.

References

CVSS Scores

version 3.1