CVE-2021-33026 Deserialization of Untrusted Data in Flask-Caching
Attackers with cache storage access can execute arbitrary code via unsafe Pickle deserialization in the Flask-Caching extension.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2021-33026?
CVE-2021-33026 is a critical unsafe deserialization vulnerability in n/a, published on 13 May 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
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
Weakness: CWE-502
Which versions are affected by CVE-2021-33026?
2 open source packages ship an affected version, including Flask-Caching and flask-caching. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
Flask-Caching PyPI | All versions to 1.10.1 | None |
flask-caching PyPI | All versions to 1.10.1 | None |
Products include Flask-Caching Project Flask-Caching.
How do I fix CVE-2021-33026?
No fix has been published for CVE-2021-33026 yet. Limit exposure of the affected software until one is available.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2021-33026 being exploited?
There is no known exploitation of CVE-2021-33026 in the wild and no public exploit code.
Public exploit code: 2 proofs of concept on GitHub.
Sources
Also known as DEBIAN-CVE-2021-33026, GHSA-656c-6cxf-hvcv.