Skip to content

Regular Expression Denial of Service (ReDoS) #403

@crmpicco

Description

@crmpicco

I have run an audit of my front-end packages for the first time in a while and there are a whole bunch of findings reported at "high" level coming from grunt-contrib-imagemin.

Are there any plans to update this?

yarn audit          
yarn audit v1.22.22
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ http-cache-semantics vulnerable to Regular Expression Denial │
│               │ of Service                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ http-cache-semantics                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.1.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ grunt-contrib-imagemin                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ grunt-contrib-imagemin > imagemin-gifsicle > gifsicle >      │
│               │ bin-wrapper > download > got > cacheable-request >           │
│               │ http-cache-semantics                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/1092316                     │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ semver-regex Regular Expression Denial of Service (ReDOS)    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ semver-regex                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=3.1.3                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ grunt-contrib-imagemin                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ grunt-contrib-imagemin > imagemin-gifsicle > gifsicle >      │
│               │ bin-wrapper > bin-version-check > bin-version >              │
│               │ find-versions > semver-regex                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/1092475                     │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ low           │ Regular expression denial of service in semver-regex         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ semver-regex                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=3.1.4                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ grunt-contrib-imagemin                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ grunt-contrib-imagemin > imagemin-gifsicle > gifsicle >      │
│               │ bin-wrapper > bin-version-check > bin-version >              │
│               │ find-versions > semver-regex                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/1092605                     │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ Uncontrolled Resource Consumption in trim-newlines           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ trim-newlines                                                │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=3.0.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ grunt-contrib-imagemin                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ grunt-contrib-imagemin > imagemin-gifsicle > gifsicle >      │
│               │ logalot > squeak > lpad-align > meow > trim-newlines         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/1095100                     │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ Inefficient Regular Expression Complexity in nth-check       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ nth-check                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=2.0.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ grunt-contrib-imagemin                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ grunt-contrib-imagemin > imagemin-svgo > svgo > css-select > │
│               │ nth-check                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/1095141                     │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ Uncontrolled resource consumption in braces                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ braces                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=3.0.3                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ grunt-contrib-imagemin                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ grunt-contrib-imagemin > imagemin > globby > fast-glob >     │
│               │ micromatch > braces                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/1098094                     │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate      │ Regular Expression Denial of Service (ReDoS) in micromatch   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ micromatch                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.0.8                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ grunt-contrib-imagemin                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ grunt-contrib-imagemin > imagemin > globby > fast-glob >     │
│               │ micromatch                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/1098681                     │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ Regular Expression Denial of Service (ReDoS) in cross-spawn  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ cross-spawn                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=6.0.6                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ bin-build                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ bin-build > execa > cross-spawn                              │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/1100562                     │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ Regular Expression Denial of Service (ReDoS) in cross-spawn  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ cross-spawn                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=6.0.6                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ grunt-contrib-imagemin                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ grunt-contrib-imagemin > imagemin-gifsicle > exec-buffer >   │
│               │ execa > cross-spawn                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/1100562                     │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ Regular Expression Denial of Service (ReDoS) in cross-spawn  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ cross-spawn                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=6.0.6                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ grunt-contrib-imagemin                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ grunt-contrib-imagemin > imagemin-gifsicle > gifsicle >      │
│               │ bin-build > execa > cross-spawn                              │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/1100562                     │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ Regular Expression Denial of Service (ReDoS) in cross-spawn  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ cross-spawn                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=6.0.6                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ grunt-contrib-imagemin                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ grunt-contrib-imagemin > imagemin-gifsicle > gifsicle >      │
│               │ bin-wrapper > bin-check > execa > cross-spawn                │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/1100562                     │
└───────────────┴──────────────────────────────────────────────────────────────┘
15 vulnerabilities found - Packages audited: 737
Severity: 1 Low | 5 Moderate | 9 High
✨  Done in 0.86s.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions