CSS-loader, a crucial module for webpack, saw a minor update from version 0.28.8 to 0.28.9. Both versions maintaining practically identical core functionality centered around enabling webpack to interpret and process CSS files. The update primarily impacts the dependency postcss-modules-extract-imports, upgrading it from version 1.1.0 to 1.2.0. While other dependencies such as babel-code-frame, css-selector-tokenizer, cssnano, icss-utils, loader-utils, lodash.camelcase, object-assign, postcss, postcss-modules-local-by-default, postcss-modules-scope, postcss-modules-values, postcss-value-parser, and source-list-map remain unchanged, including development dependencies.
Developers using css-loader should assess their reliance on postcss-modules-extract-imports. If directly utilizing functionalities or bug fixes introduced in version 1.2.0, upgrading to css-loader 0.28.9 is recommended. The update has no other breaking changes and simply updates the peer dependency. This ensures compatibility and potentially benefits from improvements and security patches within the updated dependency. If postcss-modules-extract-imports is used indirectly, testing your application after upgrading is important to ensure stability. Version 0.28.9 was released on January 17, 2018, a relatively short time after the release of version 0.28.8 on January 5, 2018, suggesting the update likely addresses a specific issue or enhancement related to import extraction within CSS modules. Both versions of css-loader are distributed under the MIT license and maintained by Tobias Koppers which means it is free to use.
All the vulnerabilities related to the version 0.28.9 of the package
Denial of Service in js-yaml
Versions of js-yaml
prior to 3.13.0 are vulnerable to Denial of Service. By parsing a carefully-crafted YAML file, the node process stalls and may exhaust system resources leading to a Denial of Service.
Upgrade to version 3.13.0.
Code Injection in js-yaml
Versions of js-yaml
prior to 3.13.1 are vulnerable to Code Injection. The load()
function may execute arbitrary code injected through a malicious YAML file. Objects that have toString
as key, JavaScript code as value and are used as explicit mapping keys allow attackers to execute the supplied code through the load()
function. The safeLoad()
function is unaffected.
An example payload is
{ toString: !<tag:yaml.org,2002:js/function> 'function (){return Date.now()}' } : 1
which returns the object
{
"1553107949161": 1
}
Upgrade to version 3.13.1.
Regular Expression Denial of Service (ReDoS)
The is-svg package 2.1.0 through 4.2.1 for Node.js uses a regular expression that is vulnerable to Regular Expression Denial of Service (ReDoS). If an attacker provides a malicious string, is-svg will get stuck processing the input.
ReDOS in IS-SVG
A vulnerability was discovered in IS-SVG version 4.3.1 and below where a Regular Expression Denial of Service (ReDOS) occurs if the application is provided and checks a crafted invalid SVG string.
Regular Expression Denial of Service (ReDOS)
In the npm package color-string
, there is a ReDos (Regular Expression Denial of Service) vulnerability regarding an exponential time complexity for
linearly increasing input lengths for hwb()
color strings.
Strings reaching more than 5000 characters would see several milliseconds of processing time; strings reaching more than 50,000 characters began seeing 1500ms (1.5s) of processing time.
The cause was due to a the regular expression that parses hwb() strings - specifically, the hue value - where the integer portion of the hue value used a 0-or-more quantifier shortly thereafter followed by a 1-or-more quantifier.
This caused excessive backtracking and a cartesian scan, resulting in exponential time complexity given a linear increase in input length.
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.