EIQ-2019-0026#

ID

EIQ-2019-0026

CVE

CVE-2019-12760

Description

Parso could allow arbitrary code execution

Date

14 Jun 2019

Severity

3 - HIGH

CVSSv3 score

7.5

Status

✅ 2.6.0

Assessment

Parso versions 0.4.0 and earlier are vulnerable to deserialization of untrusted data.

The Parso Python library enables Python code parsing and autocomplete.

It is used by IPython, which is a dependency of the eiq-platform shell platform command and its set of sub-commands.

The vulnerability affects grammar parsing from the cache. Cache loading relies on pickle. Pickle is not secure against erroneous or maliciously constructed data.

To exploit the vulnerability, attackers must be able to create a folder, and to write files to the target system.

A proof of concept demonstrates how the exploit could leverage the vulnerability:

  • Guess the path to a cache file.

  • Write an evil pickled object to it.

  • Load the parsing grammar.

  • During grammar loading, the exploit makes the vulnerable application load the evil pickle to enable arbitrary code execution.

Mitigation

Make sure that platform access through SSH, and that platform shell usage are restricted:

  • Enforce strict access control on who is authorized to connect to a platform instance through SSH.

  • Enforce strict access control on who is authorized to access and use eiq-platform shell.

  • Do not unpickle data received from an untrusted or from an unauthenticated data source.

At the moment, it is not possible to globally upgrade Parso, because it occurs at least once as a sub-dependency.

Sub-dependencies are indirect dependencies of other third-party dependencies.

We cannot control these dependencies.

We address these issues as soon as eligible third-party patches become available through their respective vendors, owners, or official maintainers.

Affected versions

2.5.0 and earlier.

Notes

For more information, see: