Arbitrary Command Execution Affecting pyxdg package, versions [,0.26)


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

EPSS
1.21% (85th 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 Arbitrary Command Execution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-PYXDG-174562
  • published1 May 2019
  • disclosed2 Feb 2019
  • creditAlexandre D'Hondt

Introduced: 2 Feb 2019

CVE-2019-12761  (opens in a new tab)
CWE-94  (opens in a new tab)
First added by Snyk

How to fix?

Upgrade pyxdg to version 0.26 or higher.

Overview

pyxdg contains implementations of freedesktop.org standards in python.

Affected versions of this package are vulnerable to Arbitrary Command Execution via the xdg.Menu.parse() function. When it is possible to craft an evil menu file with a Category node containing Python injected code. Then it is possible to update xdg_config_dirs with its location folder, the evil menu can be parsed and an attacker could exploit the vulnerability. This is due to a lack of sanitization in xdg/Menu.py. When the evil menu file is parsed, the injected code is executed because of an unsanitized eval().

CVSS Scores

version 3.1