{"id":"USN-4897-1","summary":"pygments vulnerability","details":"Ben Caller discovered that Pygments incorrectly handled parsing certain\nfiles. If a user or automated system were tricked into parsing a specially\ncrafted file, a remote attacker could cause Pygments to hang or consume\nresources, resulting in a denial of service.\n","modified":"2026-02-10T04:42:07Z","published":"2021-03-30T16:33:13Z","related":["UBUNTU-CVE-2021-27291"],"upstream":["CVE-2021-27291","UBUNTU-CVE-2021-27291"],"references":[{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-4897-1"},{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-27291"}],"affected":[{"package":{"name":"pygments","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/pygments@2.1+dfsg-1ubuntu0.2?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1+dfsg-1ubuntu0.2"}]}],"versions":["2.0.1+dfsg-1.1svn1","2.0.1+dfsg-1.1ubuntu1","2.1+dfsg-1","2.1+dfsg-1ubuntu0.1"],"ecosystem_specific":{"binaries":[{"binary_name":"python-pygments","binary_version":"2.1+dfsg-1ubuntu0.2"},{"binary_name":"python3-pygments","binary_version":"2.1+dfsg-1ubuntu0.2"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-4897-1.json","cves_map":{"ecosystem":"Ubuntu:16.04:LTS","cves":[{"severity":[{"score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","type":"CVSS_V3"},{"score":"medium","type":"Ubuntu"}],"id":"CVE-2021-27291"}]}}},{"package":{"name":"pygments","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/pygments@2.2.0+dfsg-1ubuntu0.2?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.0+dfsg-1ubuntu0.2"}]}],"versions":["2.2.0+dfsg-1","2.2.0+dfsg-1ubuntu0.1"],"ecosystem_specific":{"binaries":[{"binary_name":"python-pygments","binary_version":"2.2.0+dfsg-1ubuntu0.2"},{"binary_name":"python3-pygments","binary_version":"2.2.0+dfsg-1ubuntu0.2"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-4897-1.json","cves_map":{"ecosystem":"Ubuntu:18.04:LTS","cves":[{"severity":[{"score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","type":"CVSS_V3"},{"score":"medium","type":"Ubuntu"}],"id":"CVE-2021-27291"}]}}},{"package":{"name":"pygments","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/pygments@2.3.1+dfsg-1ubuntu2.2?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.1+dfsg-1ubuntu2.2"}]}],"versions":["2.3.1+dfsg-1ubuntu1","2.3.1+dfsg-1ubuntu2","2.3.1+dfsg-1ubuntu2.1"],"ecosystem_specific":{"binaries":[{"binary_name":"python-pygments","binary_version":"2.3.1+dfsg-1ubuntu2.2"},{"binary_name":"python3-pygments","binary_version":"2.3.1+dfsg-1ubuntu2.2"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-4897-1.json","cves_map":{"ecosystem":"Ubuntu:20.04:LTS","cves":[{"severity":[{"score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","type":"CVSS_V3"},{"score":"medium","type":"Ubuntu"}],"id":"CVE-2021-27291"}]}}}],"schema_version":"1.7.3"}