Debian Security Advisory

DLA-2600-1 pygments -- LTS security update

Date Reported:
19 Mar 2021
Affected Packages:
Security database references:
In Mitre's CVE dictionary: CVE-2021-27291.
More information:

It was discovered that there was a series of denial of service vulnerabilities in Pygments, a popular syntax highlighting library for Python.

A number of regular expressions had exponential or cubic worst-case complexity which could cause a remote denial of service (DoS) when provided with malicious input.

  • CVE-2021-27291

    In pygments 1.1+, fixed in 2.7.4, 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 are vulnerable to ReDoS. By crafting malicious input, an attacker can cause a denial of service.

For Debian 9 Stretch, these problems have been fixed in version 2.2.0+dfsg-1+deb9u2.

We recommend that you upgrade your pygments packages.

Further information about Debian LTS security advisories, how to apply these updates to your system and frequently asked questions can be found at: