CVE-2015-8557 Command Injection in Pygments

Critical 9.0 Published Updated

Remote attackers can execute arbitrary commands via shell metacharacters in font names processed by the Pygments library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2015-8557?

CVE-2015-8557 is a critical command injection vulnerability in Canonical Ubuntu Linux, published on 8 Jan 2016. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-78

Which versions are affected by CVE-2015-8557?

3 open source packages ship an affected version, including pygments and Pygments. It affects 2 products.

PackageAffectedFixed in
pygments PyPIFrom 1.2.22.1
pygments PyPIFrom 1.2.22.1
Pygments PyPIFrom 1.2.22.1

Products include Canonical Ubuntu Linux, Pygments Pygments.

How do I fix CVE-2015-8557?

Upgrade pygments to 2.1 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2015-8557 being exploited?

There is no known exploitation of CVE-2015-8557 in the wild and no public exploit code.

All Canonical Ubuntu Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2015-8557, DLA-369-1, DSA-3445-1, GHSA-fff8-4w9p-7v76, MGASA-2015-0478, PYSEC-2016-32 and 2 more.

Is CVE-2015-8557 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free