Vulnerability · Published May 13, 2021 · Assigned by mitre
CVE-2021-33026
Critical 9.8
In plain English
A critical-severity unsafe deserialization in the flask-caching package (Debian). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 7.3% (higher than 94% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code.
Official description
The Flask-Caching extension through 1.10.1 for Flask relies on Pickle for serialization, which may lead to remote code execution or local privilege escalation. If an attacker gains access to cache storage (e.g., filesystem, Memcached, Redis, etc.), they can construct a crafted payload, poison the cache, and execute Python code. NOTE: a third party indicates that exploitation is extremely unlikely unless the machine is already compromised; in other cases, the attacker would be unable to write their payload to the cache and generate the required collision
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | flask-caching | no fix listed | DEBIAN-CVE-2021-33026 |
| Debian:13 | flask-caching | no fix listed | DEBIAN-CVE-2021-33026 |
| Debian:14 | flask-caching | no fix listed | DEBIAN-CVE-2021-33026 |
| PyPI | flask-caching | no fix listed | GHSA-656c-6cxf-hvcv |
Affected products (as reported)
Weakness: CWE-502 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/sh4nks/flask-caching/pull/209 x_refsource_MISC
- https://github.com/pallets-eco/flask-caching/pull/209#issuecomment-1136397937 x_refsource_MISC