CVE-2015-8557 is a critical-severity (CVSS 9) OS Command Injection vulnerability in pygments. A fix is available for pygments — see the affected versions and patch details below.
Command Injection in Pygments
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
pygmentsReal-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
The FontManager._get_nix_font_path function in formatters/img.py in Pygments 1.2.2 through 2.0.2 allows remote attackers to execute arbitrary commands via shell metacharacters in a font name.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | pygments | ≥ 1.2.2&&< 2.1 | 2.1pip install --upgrade 'pygments==2.1' |
Affected Products
ubuntu linuxcanonicalpygmentspygmentsDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for pygments, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update pygments to 2.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2015-8557 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.
Frequently Asked Questions
Is CVE-2015-8557 in your dependencies?
Find it across PyPI, including transitive dependencies.