CVE-2019-9710: webargs - JSON Parsing Cache Thread-Safety Issue
Summary
PYSEC-2019-69: An issue was discovered in webargs before 5.1.3, as used with marshmallow and other products. Affects webargs versions < 5.1.3. Fixed in 5.1.3. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
webargs is a Python library used for parsing and validating HTTP request arguments. It is commonly used with frameworks like Flask and Django to handle request data. The library provides a convenient way to parse JSON payloads and extract data from them. However, prior to version 5.1.3, webargs had a vulnerability related to its JSON parsing cache, which could lead to incorrect parsing of JSON payloads for concurrent requests.
Vulnerability Detail
The vulnerability in webargs arises from the use of a short-lived cache to store parsed JSON bodies. This cache is not thread-safe, meaning that if multiple requests are processed concurrently, there is a possibility of incorrect JSON payloads being parsed. This can have various consequences depending on the application logic. For example, if the parsed JSON is used for authentication or authorization purposes, an attacker could potentially bypass security measures by sending a specially crafted JSON payload. Additionally, incorrect parsing of JSON could lead to unexpected behavior or data corruption within the application.
How To Fix
Latest published version: 8.7.1 as of 23 Oct 2026
pip install --upgrade "webargs==8.7.1"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
5.1.3
This is the first release that contains the fix.
pip install --upgrade "webargs==5.1.3"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability. However, as a general best practice, it is recommended to ensure that the application handles concurrent requests properly and does not rely solely on the JSON parsing cache for security-critical operations. Implementing additional validation and verification checks on the parsed JSON data can also help mitigate the risk of incorrect parsing.
Conclusion
The vulnerability in webargs prior to version 5.1.3 could result in incorrect parsing of JSON payloads for concurrent requests. This could have various security implications and potentially lead to unauthorized access or unexpected behavior in the application. It is strongly recommended to upgrade to webargs version 5.1.3 or later to mitigate this vulnerability. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for webargs →
FAQ
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your Pipfile.lock file, and Vulert will analyze it to identify any open-source vulnerabilities, including this one.
While upgrading to the fixed version is the recommended solution, you can also mitigate the risk by implementing proper request handling and validation in your application. Avoid relying solely on the JSON parsing cache and consider additional checks on the parsed JSON data to ensure its integrity.
At the time of this advisory, there are no known public exploits specifically targeting this vulnerability in webargs. However, it is always important to promptly address security vulnerabilities to minimize the risk of potential exploits.
Yes, the official webargs documentation provides guidance on security best practices, including input validation and handling. It is recommended to review the documentation and follow the recommended practices to enhance the security of your application.
If you discover any other security vulnerabilities in webargs, you can report them to the webargs maintainers by creating an issue on the official GitHub repository (https://github.com/marshmallow-code/webargs/issues). They will assess the reported vulnerability and take appropriate actions to address it.
References
Related vulnerabilities
Recent vulnerabilities recorded for webargs.