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
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | flask-caching | No fix yet | — |
| Debian 13 | flask-caching | No fix yet | — |
| Debian 12 | flask-caching | No fix yet | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 2 repositories
-
CarlosG13/CVE-2021-33026 ★ 4 · Nov 5, 2021
Pickle Serialization Remote Code Execution - Memcached Poisoning
-
Agilevatester/FlaskCache_CVE-2021-33026_POC ★ 1 · Oct 8, 2024
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | flask-caching | <= 1.10.1 | — | GHSA-656c-6cxf-hvcv |
Advisories 1
- WID-SEC-2023-0426 IBM Spectrum Protect: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jan 6, 2025