Advisory

GHSA-fjq3-5pxw-4wj4

Also known as: CVE-2020-7965, PYSEC-2020-156

Summary

Cross-Site Request Forgery in Webargs

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2021-04-07 21:06 UTC
Modified
2024-11-19 15:50 UTC

Affected packages and fixes

webargs

PyPI · All systems

Affected

  • introduced 5.0.0, fixed 5.5.3 (ecosystem)

Fixed versions

5.5.3

Fix

  • Fixed version 5.5.3
    pip install --upgrade webargs==5.5.3

webargs

PyPI · All systems

Affected

  • introduced 6.0.0b1, fixed 6.0.0b4 (ecosystem)

Fixed versions

6.0.0b4

Fix

  • Fixed version 6.0.0b4
    pip install --upgrade webargs==6.0.0b4

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences