Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: glob-parent@5.1.0 introduces ReDoS vulnerability #4415

Closed
simonhmadsen opened this issue May 21, 2021 · 4 comments
Closed

[Bug]: glob-parent@5.1.0 introduces ReDoS vulnerability #4415

simonhmadsen opened this issue May 21, 2021 · 4 comments

Comments

@simonhmadsen
Copy link

simonhmadsen commented May 21, 2021

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

The dependency glob-parent@5.1.0 introduces a ReDoS vulnerability
(https://app.snyk.io/vuln/SNYK-JS-GLOBPARENT-1016905)

The vulnerability was fixed in glob-parent@5.1.2

@adamwathan
Copy link
Member

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.

@thinkjrs
Copy link

thinkjrs commented Jun 16, 2021

@adamwathan I am experiencing this in a current project:

                       === npm audit security report ===                        
                                                                                
┌──────────────────────────────────────────────────────────────────────────────┐
│                                Manual Review                                 │
│            Some vulnerabilities require your attention to resolve            │
│                                                                              │
│         Visit https://go.npm.me/audit-guide for additional guidance          │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Regular expression denial of service                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ glob-parent                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=5.1.2                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ tailwindcss [dev]                                            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ tailwindcss > parse-glob > glob-base > glob-parent           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1751                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
found 1 moderate severity vulnerability in 1675 scanned packages
  1 vulnerability requires manual review. See the full report for details.

I have the following in my package.json related to tailwindcss:

"@tailwindcss/aspect-ratio": "^0.2.1",
"@tailwindcss/forms": "^0.2.1",
"@tailwindcss/typography": "^0.4.1",
"tailwindcss": "^2.1.4",

Installing the package directly doesn't help, of course.

After some digging, it looks like glob-base has an open issue to update glob-parent:

micromatch/glob-base#6

@adamwathan
Copy link
Member

adamwathan commented Jun 16, 2021

@thinkjrs We've removed our dependency on parse-glob and pulled in glob-parent ourselves so we can lock it to a newer version so you won't see this in the next release:

#4458

@thinkjrs
Copy link

@thinkjrs We've removed our dependency on parse-glob and pulled in glob-parent ourselves so we can lock it to a newer version so you won't see this in the next release:

#4458

🥇

  1. Thank you for the rapid fire response.
  2. This is precisely why we are happy, paying customers of yours.

That's a great solution and you all implemented very quickly, as well. You + team are awesome. Thanks for all the good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants