Shell Injection Vulnerability in pygments

pygments Updated 02 Oct 2025

Summary

13/01/2016
N/A
Yes i
Unrated
Not published

DSA-3445-1: pygments - security update. Affects pygments versions < 1.5+dfsg-1+deb7u1. Fixed in 1.5+dfsg-1+deb7u1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

pygments is a generic syntax highlighter that is commonly used to add code highlighting functionality to various applications and programming languages. It provides support for a wide range of languages and formats, making it a popular choice among developers. However, a vulnerability has been discovered in pygments that allows remote attackers to execute arbitrary code through a shell injection attack. This vulnerability is caused by the lack of proper input sanitization when processing font names.

Vulnerability Detail

The shell injection vulnerability in pygments allows an attacker to execute arbitrary code by injecting shell metacharacters into a font name. This can be exploited by an attacker who can control the font name parameter, such as in a web application that allows users to specify custom fonts. By injecting malicious shell commands, an attacker can execute arbitrary code with the privileges of the user running the pygments process. This can lead to various consequences, including unauthorized access, data theft, or even complete compromise of the affected system.

How To Fix

Minimum fixed version

1.5+dfsg-1+deb7u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade pygments

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

The shell injection vulnerability in pygments can have serious security implications, allowing remote attackers to execute arbitrary code. It is crucial to update to the fixed versions of pygments to mitigate the risk of exploitation. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for pygments →

Share this vulnerability

FAQ

pygments is a generic syntax highlighter used for code highlighting in various applications and programming languages.

A shell injection vulnerability allows an attacker to execute arbitrary shell commands by injecting malicious input into a vulnerable application.

The vulnerability can be exploited by injecting shell metacharacters into a font name parameter, allowing the attacker to execute arbitrary code.

The consequences of this vulnerability can include unauthorized access, data theft, or complete compromise of the affected system.

To fix this vulnerability, it is recommended to upgrade to the latest version of pygments.

Related vulnerabilities

Recent vulnerabilities recorded for pygments.

How To Fix

Minimum fixed version

1.5+dfsg-1+deb7u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade pygments

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback