CVE-2015-8557
Command Injection in Pygments
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.0
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.
- Record
CVE-2015-8557- CVSS 3.0
- 9.0 Critical
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H - CVSS 2.0
- 9.3 High
AV:N/AC:M/Au:N/C:C/I:C/A:C - Weakness
- CWE-78
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2015-8557- Updated
- 2026-11-02
EUVDEUVD-2016-0026 No score
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.
- Record
EUVD-2016-0026- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-fff8-4w9p-7v76
9.5
Command Injection in Pygments
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.
- Record
GHSA-fff8-4w9p-7v76- CVSS 4.0
- 9.5 Critical
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - CVSS 3.0
- 9.0 Critical
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSV
9.0
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.
- Record
CVE-2015-8557- CVSS 3.0
- 9.0 Critical
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2015-8557
9.0
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.
- Record
DEBIAN-CVE-2015-8557- CVSS 3.0
- 9.0 Critical
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
Show 5 moreShow less
OSVGHSA-fff8-4w9p-7v76
9.5
Command Injection in Pygments
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.
- Record
GHSA-fff8-4w9p-7v76- CVSS 4.0
- 9.5 Critical
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - CVSS 3.0
- 9.0 Critical
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2015-8557
9.0
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.
- Record
UBUNTU-CVE-2015-8557- CVSS 3.0
- 9.0 Critical
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
OSVMGASA-2015-0478 No score
Updated python-pygments packages fix security vulnerability
An unsafe use of string concatenation in a shell string occurs in FontManager. If the developer allows the attacker to choose the font and outputs an image, the attacker can execute any shell command on the remote system. The name variable injected comes from the constructor of FontManager, which is invoked by ImageFormatter from options (CVE-2015-8557, rhbz#1276321).
- Record
MGASA-2015-0478- Updated
- 2026-11-02
OSVPYSEC-2016-32 No score
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.
- Record
PYSEC-2016-32- Updated
- 2026-11-02
OSVUSN-2862-1 No score
pygments vulnerability
It was discovered that Pygments incorrectly sanitized strings used to search system fonts. An attacker could possibly use this issue to execute arbitrary code.
- Record
USN-2862-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
pygmentsPyPI |
1.2.2 up to 2.1 | 2.1 |
pygmentsDebian:12 |
before 2.0.1+dfsg-2 | 2.0.1+dfsg-2 |
pygmentsDebian:13 |
before 2.0.1+dfsg-2 | 2.0.1+dfsg-2 |
pygmentsDebian:14 |
before 2.0.1+dfsg-2 | 2.0.1+dfsg-2 |
pygmentsDebian:6.0 |
before 1.3.1+dfsg-1+deb6u11, plus listed versions 1.3.1+dfsg-1 |
1.3.1+dfsg-1+deb6u11 |
pygmentsDebian:7 |
before 1.5+dfsg-1+deb7u1, plus listed versions 1.5+dfsg-1 |
1.5+dfsg-1+deb7u1 |
pygmentsDebian:8 |
before 2.0.1+dfsg-1.1+deb8u1, plus listed versions 2.0.1+dfsg-1.1 |
2.0.1+dfsg-1.1+deb8u1 |
pygmentsPyPI |
1.2.2 up to 2.1, plus listed versions 1.31.3.11.41.51.6 Show 5 moreShow less1.6rc12.02.0.12.0.22.0rc1 |
2.1 |
python-pygmentsMageia:5 |
before 1.6-9.1.mga5 | 1.6-9.1.mga5 |
pygmentsUbuntu:14.04:LTS |
before 1.6+dfsg-1ubuntu1.1, plus listed versions 1.6+dfsg-11.6+dfsg-1build11.6+dfsg-1ubuntu1 |
1.6+dfsg-1ubuntu1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2015-8557 is a critical vulnerability (CVSS 9.0) in Pygments, published December 15, 2015. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 6.72%, the 93rd percentile. Fixed in pygments 2.1.
References
ubuntu.com/usn/USN-2862-1
packetstormsecurity.com/files/133823/Pygments-FontManager._get_nix_font_path-Shell-Injection.html
openwall.com/lists/oss-security/2015/12/14/6
openwall.com/lists/oss-security/2015/12/14/17
seclists.org/fulldisclosure/2015/Oct/4
debian.org/security/2016/dsa-3445
Show 15 moreShow less
oracle.com/technetwork/topics/security/bulletinjan2016-2867206.html
security.gentoo.org/glsa/201612-05
bitbucket.org/birkenfeld/pygments-main/pull-requests/501/fix-shell-injection-in/diff
nvd.nist.gov/vuln/detail/CVE-2015-8557
github.com/advisories/GHSA-fff8-4w9p-7v76
github.com/pypa/advisory-database/tree/main/vulns/pygments/PYSEC-2016-32.yaml
github.com/pygments/pygments/commit/db6dd826f8624179e563aaded391efe824462f51
security-tracker.debian.org/tracker/CVE-2015-8557
github.com/pygments/pygments
advisories.mageia.org/MGASA-2015-0478.html
bugs.mageia.org/show_bug.cgi?id=17331
bugzilla.redhat.com/show_bug.cgi?id=1276321
ubuntu.com/security/CVE-2015-8557
ubuntu.com/security/notices/USN-2862-1
cve.org/CVERecord?id=CVE-2015-8557