Skip to content

glob-parent introduces ReDoS vulnerability #4454

@simonhammerholt

Description

@simonhammerholt

What version of Tailwind CSS are you using?

2.1.2

What build tool (or framework if it abstracts the build tool) are you using?

webpack@5.14.0

What version of Node.js are you using?

v14.11.0

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction repository

https://github.com/tailwindlabs/tailwindcss

Describe your issue

I previously opened an issue related to a ReDoS vulnerability in tailwind caused by the indirect dependency on glob-parent, but it was closed with the comment:

Hey! This is a transitive dependency for us but we are on 5.1.2 in our lock file already. For anyone who installs Tailwind, the lock file will be ignored but they should get the latest version.

I attempted to make this work, but i don't think it is possible.

Even after deduplicating and optimizing the lock-file, glob-parent is still present in a version from before the fix was introduced. It seems that the following dependency relationship introduces the vulnerability

tailwindcss@2.1.2 › parse-glob@3.0.4 › glob-base@0.3.0 › glob-parent@2.0.0

Unfortunately, parse-glob hasn't been updated in the last 6 years, so the newest version is 3.0.4, and the same goes for glob-base, so the only solution i can think of, is to replace parse-glob with a different library.

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