{"id":"CVE-2021-33026","aliases":["CVE-2021-33026","GHSA-656c-6cxf-hvcv"],"related":[],"kind":"vulnerability","state":"published","title":"Deserialization of Untrusted Data in Flask-Caching","summary":"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","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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","source":"cvelist"},{"lang":"en","text":"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.\n\nHowever, this is not a high-severity issue, as for an attack like this to work, an attacker must:\n\n1. Be able to write arbitrary values to the cache\n2. Be able to generate a cache key that will collide with a value being read by the application\n3. Cause the application to read a maliciously-injected value\n\nAny 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).","format":"markdown","source":"ghsa"},{"lang":"es","text":"** EN DISPUTA ** La extensión Flask-Caching hasta la versión 1.10.1 para Flask se basa en Pickle para la serialización, lo que puede llevar a la ejecución remota de código o a la escalada local de privilegios. Si un atacante obtiene acceso al almacenamiento de la caché (por ejemplo, el sistema de archivos, Memcached, Redis, etc.), puede construir una carga útil manipulada, envenenar la caché y ejecutar código Python. NOTA: un tercero indica que la explotación es extremadamente improbable a menos que la máquina ya esté comprometida; en otros casos, el atacante no podría escribir su carga útil en la caché y generar la colisión necesaria","source":"nvd"}],"published":"2021-05-13T22:51:20.000Z","modified":"2026-06-17T03:54:02.267Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:H/A:N","score":4.2,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-269","CWE-502"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","lastAffected":"1.10.1","status":"affected"}],"vendor":"flask-caching_project","product":"flask-caching","cpe":"cpe:2.3:a:flask-caching_project:flask-caching:*:*:*:*:*:flask:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"1.10.1"}],"ecosystem":"PyPI","package":"flask-caching","purl":"pkg:pypi/flask-caching","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"1.10.1"}],"vendor":"flask-caching_project","product":"flask-caching","cpe":"cpe:2.3:a:flask-caching_project:flask-caching:*:*:*:*:*:flask:*:*","source":"nvd"}],"references":[{"url":"https://github.com/sh4nks/flask-caching/pull/209","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/pallets-eco/flask-caching/pull/209#issuecomment-1136397937","tags":["issue-tracking","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-33026","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-656c-6cxf-hvcv","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/flask-caching/PYSEC-2021-13.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/sh4nks/flask-caching","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2024-07-19T18:22:56.685Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-33026","url":"https://www.cve.org/CVERecord?id=CVE-2021-33026","licence":"CVE Terms of Use","modified":"2024-08-03T23:42:19.075Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-656c-6cxf-hvcv","url":"https://github.com/advisories/GHSA-656c-6cxf-hvcv","licence":"CC-BY-4.0","modified":"2024-02-16T08:16:33.120Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-33026","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-33026","licence":"Public domain","modified":"2026-06-17T03:54:02.267Z"}],"updatedAt":"2026-11-25T22:58:01.338Z","epss":{"score":0.07348,"percentile":0.94526,"date":"2026-12-01T12:00:22.000Z"}}