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



    Attack Complexity Low

    Threat Intelligence

    EPSS 0.97% (83rd percentile)
Expand this section
7.5 high
Expand this section
7.3 high
Expand this section
Red Hat
6.1 medium

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-PYXDG-174562
  • published 1 May 2019
  • disclosed 2 Feb 2019
  • credit Alexandre D'Hondt

How to fix?

Upgrade pyxdg to version 0.26 or higher.


pyxdg contains implementations of 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/ When the evil menu file is parsed, the injected code is executed because of an unsanitized eval().