CriticalGHSA-fff8-4w9p-7v76CVE-2015-8557PYSEC-2016-32
Command Injection in Pygments
Published 17 May 2022 · Updated 24 Oct 2024
Is your project on an affected pygments?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
pygmentsPyPI
- Affected
- >=1.2.2 <2.1
- Fixed in
- 2.1
Update to the fixed version for your release line, for example:
pip install 'pygments>=2.1'Details
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.
Is GHSA-fff8-4w9p-7v76 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected pygments, and gives you the command that fixes it.
More advisories for pygments
- LowCVE-2026-4539Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching · 22 Mar 2026
- MediumCVE-2022-40896Pygments vulnerable to ReDoS · 19 Jul 2023
- HighCVE-2021-20270Infinite Loop in Pygments · 20 Apr 2021
- HighCVE-2021-27291Pygments vulnerable to Regular Expression Denial of Service (ReDoS) · 29 Mar 2021
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2015-8557
- Linkgithub.com/pygments/pygments/commit/db6dd826f8624179e563aaded391efe824462f51
- Linkbitbucket.org/birkenfeld/pygments-main/pull-requests/501/fix-shell-injection-in/diff
- Advisorygithub.com/advisories/GHSA-fff8-4w9p-7v76
- Packagegithub.com/pygments/pygments
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/pygments/PYSEC-2016-32.yaml
- Linksecurity.gentoo.org/glsa/201612-05
- Linkpacketstormsecurity.com/files/133823/Pygments-FontManager._get_nix_font_path-Shell-Injection.html
- Linkseclists.org/fulldisclosure/2015/Oct/4
- Linkwww.debian.org/security/2016/dsa-3445
- Linkwww.openwall.com/lists/oss-security/2015/12/14/17
- Linkwww.openwall.com/lists/oss-security/2015/12/14/6
- Linkwww.oracle.com/technetwork/topics/security/bulletinjan2016-2867206.html
- Linkwww.ubuntu.com/usn/USN-2862-1
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.