CVE-2021-33026
Deserialization of Untrusted Data in Flask-Caching
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
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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
- Record
CVE-2021-33026- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-502
- Updated
- 2026-11-02
CVE List
9.8
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
- Record
CVE-2021-33026- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-502
- Updated
- 2026-11-02
EUVDEUVD-2021-0084
9.8
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
- Record
EUVD-2021-0084- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-656c-6cxf-hvcv
4.2
Deserialization of Untrusted Data in Flask-Caching
Flask-Cache adds easy cache support to Flask. 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.
However, this is not a high-severity issue, as for an attack like this to work, an attacker must:
- Be able to write arbitrary values to the cache
- Be able to generate a cache key that will collide with a value being read by the application
- Cause the application to read a maliciously-injected value
Any situation where all 3 of those is true is a situation where the application has larger problems; for example, if someone's able to inject malicious cached rendered pages into a Flask app's cache, then they can make the website say literally anything they want, regardless of whether it involves the execution of remote code. Basically, the Pickle vulnerability follows from a website already being extremely vulnerable (due to conditions 1 and 2 being met).
- Record
GHSA-656c-6cxf-hvcv- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:H/A:N - Weakness
- CWE-269, CWE-502
- Updated
- 2026-11-02
OSV
9.8
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
- Record
CVE-2021-33026- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-33026
9.8
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
- Record
DEBIAN-CVE-2021-33026- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVGHSA-656c-6cxf-hvcv
4.2
Deserialization of Untrusted Data in Flask-Caching
Flask-Cache adds easy cache support to Flask. 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.
However, this is not a high-severity issue, as for an attack like this to work, an attacker must:
- Be able to write arbitrary values to the cache
- Be able to generate a cache key that will collide with a value being read by the application
- Cause the application to read a maliciously-injected value
Any situation where all 3 of those is true is a situation where the application has larger problems; for example, if someone's able to inject malicious cached rendered pages into a Flask app's cache, then they can make the website say literally anything they want, regardless of whether it involves the execution of remote code. Basically, the Pickle vulnerability follows from a website already being extremely vulnerable (due to conditions 1 and 2 being met).
- Record
GHSA-656c-6cxf-hvcv- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:H/A:N - Weakness
- CWE-269, CWE-502
- Updated
- 2026-11-02
OSVPYSEC-2021-13 No score
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.
- Record
PYSEC-2021-13- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
flask-cachingPyPI |
through 1.10.1 | None known |
flask-cachingDebian:12 |
All versions, plus listed versions 2.0.2-12.1.0-12.2.0-12.3.1-12.4.0-1 Show 4 moreShow less2.4.0-22.4.1-12.4.1-22.5.1-1 |
None known |
flask-cachingDebian:13 |
All versions, plus listed versions 2.3.1-12.4.0-12.4.0-22.4.1-12.4.1-22.5.1-1 |
None known |
flask-cachingDebian:14 |
All versions, plus listed versions 2.3.1-12.4.0-12.4.0-22.4.1-12.4.1-22.5.1-1 |
None known |
flask-cachingPyPI |
through 1.10.1, plus listed versions 1.0.01.0.11.1.01.1.11.10.0 Show 13 moreShow less1.2.01.3.01.3.11.3.21.3.31.4.01.5.01.6.01.7.01.7.11.7.21.8.01.9.0 |
None known |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | Agilevatester/FlaskCache_CVE-2021-33026_POC | 2024-10-08 |
| PoC in GitHub | CarlosG13/CVE-2021-33026 | 2021-11-05 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| affected, aliases | EUVD | |
| first indexed | OSV | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-33026 is a critical vulnerability (CVSS 9.8) in Flask-caching Project Flask-caching, published May 13, 2021. Its validity is disputed. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 7.35%, the 94th percentile.
References
github.com/sh4nks/flask-caching/pull/209
github.com/pallets-eco/flask-caching/pull/209
nvd.nist.gov/vuln/detail/CVE-2021-33026
github.com/advisories/GHSA-656c-6cxf-hvcv
github.com/pypa/advisory-database/tree/main/vulns/flask-caching/PYSEC-2021-13.yaml
security-tracker.debian.org/tracker/CVE-2021-33026
github.com/sh4nks/flask-caching