Advisories for Pypi/Pygments package

2023
2021

Uncontrolled Resource Consumption

In pygments the lexers used to parse programming languages rely heavily on regular expressions. Some of the regular expressions have exponential or cubic worst-case complexity and is vulnerable to ReDoS. By crafting malicious input, an attacker can cause a denial of service.

2016

Shell Injection

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.