CVE-2019-12761 — pyxdg
HIGHCVE-2019-12761 is a high-severity (CVSS 7.5) Code Injection vulnerability in pyxdg. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for pyxdg — see the affected versions and patch details below.
Code Injection in PyXDG
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
pyxdgReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
A code injection issue was discovered in PyXDG before 0.26 via crafted Python code in a Category element of a Menu XML document in a .menu file. XDG_CONFIG_DIRS must be set up to trigger xdg.Menu.parse parsing within the directory containing this file. This is due to a lack of sanitization in xdg/Menu.py before an eval call.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | pyxdg | all versions | 0.26pip install --upgrade 'pyxdg==0.26' |
Affected Products
pyxdgpythonResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for pyxdg, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update pyxdg to 0.26 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2019-12761 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Frequently Asked Questions
Is CVE-2019-12761 in your dependencies?
Find it across PyPI, including transitive dependencies.