PT-2021-15478 · Postcss · Postcss
Yeting Li
·
Published
2021-04-26
·
Updated
2023-08-08
·
CVE-2021-23382
CVSS v3.1
5.3
Medium
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Name of the Vulnerable Software and Affected Versions
postcss versions prior to 7.0.36
postcss versions 8.0.0 through 8.2.13
Description
The issue is related to Regular Expression Denial of Service (ReDoS) via the
getAnnotationURL() and loadAnnotation() functions in lib/previous-map.js. The vulnerable regexes are caused mainly by the sub-pattern /*s* sourceMappingURL=(.*). This can lead to a denial of service when parsing specific CSS strings.Recommendations
For postcss versions prior to 7.0.36, update to version 7.0.36 or later.
For postcss versions 8.0.0 through 8.2.13, update to version 8.2.13 or later.
As a temporary workaround, consider disabling the
getAnnotationURL() and loadAnnotation() functions in lib/previous-map.js until a patch is available.
Restrict access to the lib/previous-map.js module to minimize the risk of exploitation.
Avoid using the sourceMappingURL parameter in the affected API endpoint until the issue is resolved.Exploit
Fix
DoS
Resource Exhaustion
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Postcss