Deserialization of Untrusted Data Affecting flask-caching package, versions [0,]


Severity

0.0
low
0
10

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.8% (82nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-PYTHON-FLASKCACHING-1292339
  • published 14 May 2021
  • disclosed 14 May 2021
  • credit Unknown

How to fix?

There is no fixed version for Flask-Caching.

Overview

Flask-Caching is an Adds caching support to your Flask application

Affected versions of this package are vulnerable to Deserialization of Untrusted Data. The Flask-Caching extension 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

Exploiting this vulnerability is possible if the attacker:

  1. Can write arbitrary values to the cache

  2. Can generate a cache key that will collide with a value being read by the application

  3. Can cause the application to read a maliciously-injected value

Workaround

Since version 1.11.1 it has been possible to avoid this vulnerability entirely by eliminating the use of pickle from an application using an alternative cachelib serializer.

References

CVSS Scores

version 3.1
Expand this section

Snyk

3.1 low
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Required
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    Low
  • Availability (A)
    None
Expand this section

NVD

9.8 critical