Skip to content
OpenAdvisories
Critical · 9.8 Public exploit CVE-2021-33026 EUVD-2021-0084GHSA-656c-6cxf-hvcvPYSEC-2021-13

Deserialization of Untrusted Data in Flask-Caching

Published May 13, 2021 · Updated Aug 3, 2024 · Assigned by mitre

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.

ReleasePackageFixed inAdvisory
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.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 2 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI flask-caching <= 1.10.1 — GHSA-656c-6cxf-hvcv

Advisories 1

References