USN-4897-1

Source
https://ubuntu.com/security/notices/USN-4897-1
Import Source
https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-4897-1.json
JSON Data
https://api.osv.dev/v1/vulns/USN-4897-1
Upstream
Related
Published
2021-03-30T16:33:13.650563Z
Modified
2025-10-13T04:35:26Z
Summary
pygments vulnerability
Details

Ben Caller discovered that Pygments incorrectly handled parsing certain files. If a user or automated system were tricked into parsing a specially crafted file, a remote attacker could cause Pygments to hang or consume resources, resulting in a denial of service.

References

Affected packages

Ubuntu:16.04:LTS / pygments

Package

Name
pygments
Purl
pkg:deb/ubuntu/pygments@2.1+dfsg-1ubuntu0.2?arch=source&distro=xenial

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.1+dfsg-1ubuntu0.2

Affected versions

2.*

2.0.1+dfsg-1.1svn1
2.0.1+dfsg-1.1ubuntu1
2.1+dfsg-1
2.1+dfsg-1ubuntu0.1

Ecosystem specific

{
    "availability": "No subscription required",
    "binaries": [
        {
            "binary_version": "2.1+dfsg-1ubuntu0.2",
            "binary_name": "python-pygments"
        },
        {
            "binary_version": "2.1+dfsg-1ubuntu0.2",
            "binary_name": "python3-pygments"
        }
    ]
}

Database specific

{
    "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"
            }
        ]
    }
}

Ubuntu:18.04:LTS / pygments

Package

Name
pygments
Purl
pkg:deb/ubuntu/pygments@2.2.0+dfsg-1ubuntu0.2?arch=source&distro=bionic

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.2.0+dfsg-1ubuntu0.2

Affected versions

2.*

2.2.0+dfsg-1
2.2.0+dfsg-1ubuntu0.1

Ecosystem specific

{
    "availability": "No subscription required",
    "binaries": [
        {
            "binary_version": "2.2.0+dfsg-1ubuntu0.2",
            "binary_name": "python-pygments"
        },
        {
            "binary_version": "2.2.0+dfsg-1ubuntu0.2",
            "binary_name": "python3-pygments"
        }
    ]
}

Database specific

{
    "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"
            }
        ]
    }
}

Ubuntu:20.04:LTS / pygments

Package

Name
pygments
Purl
pkg:deb/ubuntu/pygments@2.3.1+dfsg-1ubuntu2.2?arch=source&distro=focal

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.3.1+dfsg-1ubuntu2.2

Affected versions

2.*

2.3.1+dfsg-1ubuntu1
2.3.1+dfsg-1ubuntu2
2.3.1+dfsg-1ubuntu2.1

Ecosystem specific

{
    "availability": "No subscription required",
    "binaries": [
        {
            "binary_version": "2.3.1+dfsg-1ubuntu2.2",
            "binary_name": "python-pygments"
        },
        {
            "binary_version": "2.3.1+dfsg-1ubuntu2.2",
            "binary_name": "python3-pygments"
        }
    ]
}

Database specific

{
    "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"
            }
        ]
    }
}