SB2021031407 - Infinite loop in pygments
Published: March 14, 2021 Updated: March 30, 2021
Breakdown by Severity
- Low
- Medium
- High
- Critical
Description
This security bulletin contains information about 2 vulnerabilities.
1) Infinite loop (CVE-ID: CVE-2021-20270)
CWE-ID: CWE-835 - Loop with Unreachable Exit Condition ('Infinite Loop')
CVSSv4: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U/U:Clear
The vulnerability allows a remote attacker to perform a denial of service (DoS) attack.
The vulnerability exists due to infinite loop. A remote attacker can consume all available system resources and cause denial of service conditions.
2) Resource management error (CVE-ID: CVE-2021-27291)
CWE-ID: CWE-399 - Resource Management Errors
CVSSv4: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/U:Green
The vulnerability allows a remote attacker to perform a denial of service (ReDoS) attack.
The vulnerability exists due to improper management of internal resources within the application. A remote attacker can pass specially crafted data to the application and perform regular expression denial of service (ReDoS) attack.
Remediation
Install update from vendor's website.
References
- https://github.com/pygments/pygments/issues/1625
- https://github.com/pygments/pygments/commit/f91804ff4772e3ab41f46e28d370f57898700333
- https://gist.github.com/b-c-ds/b1a2cc0c68a35c57188575eb496de5ce
- https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14
- https://lists.debian.org/debian-lts-announce/2021/03/msg00024.html