tcoopman / image-webpack-loader

Image loader module for webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

posibility of a 7.0.2 release for image-webpack-loader with less strict imagemin-svgo version dependency

evansrobert opened this issue · comments

Hi, @tcoopman,

Issue Description

I noticed that a vulnerability is introduced in image-webpack-loader@7.0.1:
Vulnerability CVE-2021-33587 affects package css-what (versions:<5.0.1): https://snyk.io/vuln/SNYK-JS-CSSWHAT-1298035
The above vulnerable package is referenced by image-webpack-loader@7.0.1 via:
image-webpack-loader@7.0.1 ➔ imagemin-svgo@8.0.0 ➔ svgo@1.3.2 ➔ css-select@2.1.0 ➔ css-what@3.4.2

Since image-webpack-loader@7.0.1 (53,098 downloads per week) is referenced by 25 downstream projects (e.g., craco-image-optimizer-plugin 0.0.4 (latest version), @unbabel/ui 4.15.2 (latest version), boclips-player-react 1.2.4 (latest version), @stijnvanhulle/components 1.4.11 (latest version), fastchar-appjs 1.2.21 (latest version)), the vulnerability CVE-2021-33587 can be propagated into these downstream projects and expose security threats to them via the following package dependency paths:
(1)@astral-frontend/toolbox@1.2.1 ➔ @astral-frontend/webpack-config@2.1.0 ➔ image-webpack-loader@7.0.1 ➔ imagemin-svgo@8.0.0 ➔ svgo@1.3.2 ➔ css-select@2.1.0 ➔ css-what@3.4.2
(2)@iamota/iamota-webpack@0.8.1 ➔ image-webpack-loader@7.0.1 ➔ imagemin-svgo@8.0.0 ➔ svgo@1.3.2 ➔ css-select@2.1.0 ➔ css-what@3.4.2
......

If image-webpack-loader@7.0.* removes the vulnerable package from the above version, then its fixed version can help downstream users decrease their pain.

Given the large number of downstream users, could you help update your package to remove the vulnerability from image-webpack-loader@7.0.1 ?

Fixing suggestions

In image-webpack-loader@7.0.2, maybe you can kindly try to perform the following upgrade :
imagemin-svgo ^8.0.0 ➔ ^9.0.0;

Note:
imagemin-svgo@9.0.0(>=9.0.0) transitively depends on css-what@5.0.1 which has fixed the vulnerability CVE-2021-33587.

Of course, you are welcome to share other ways to resolve the issue.

We're facing the same issue with our build systems flagging ReDoS issue. @tcoopman can you expedite this one please?

I've pushed an 8.0.1 release, so closing this.

Can someone explain me how this vulnerability would ever be a problem in practice though?