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

[CVE-2024-4067] Vulnerability detected in micromatch.braces() #259

Closed
jpsla94 opened this issue Jun 3, 2024 · 13 comments
Closed

[CVE-2024-4067] Vulnerability detected in micromatch.braces() #259

jpsla94 opened this issue Jun 3, 2024 · 13 comments

Comments

@jpsla94
Copy link

jpsla94 commented Jun 3, 2024

Hello @jonschlinkert,

I am currently using the latest version of micromatch 4.0.7, and I notice the package was flag for a vulnerability for a Regular Expression Denial of Service (ReDos) attack. Located in micromatch.braces() in index.js, because of the pattern ".*".[CVE-2024-4067]

By the way, I have already the latest version of braces installed 3.0.3 in the package.

Is this being look at and addressed?

@jpsla94 jpsla94 changed the title Vulnerability detected in micromatch.braces() [CVE-2024-4067] Vulnerability detected in micromatch.braces() Jun 3, 2024
@jacobjmarks
Copy link

jacobjmarks commented Jun 3, 2024

It looks like this regressed between 4.0.6 — which removed the pattern as part of a4a4dbe — and 4.0.7 (which does not contain this commit).

Overall the release of 4.0.7 looks a little strange; the package.json file on master still states 4.0.6.

Edit: Looks like 4.0.7 was released based on the v4 branch, which looks to have diverged from master. I have created #260

@jpsla94
Copy link
Author

jpsla94 commented Jun 4, 2024

Thank you @jacobjmarks. Could kindly update this thread when the issue is fixed?

@cchaglund
Copy link

Hm, there's this 5-year old pinned issue at the top of the issues page.

Does it still apply today?

@JeanMeche
Copy link

Micromatch doesn't have a pined dependency on braces. if you remove your lock file, you'll get the latest version of braces with the fix

@jpsla94
Copy link
Author

jpsla94 commented Jun 11, 2024

@JeanMeche Which lock file are you talking about?

@JeanMeche
Copy link

package-lock.json, yarn.lock or pnpm-lock.yaml.

@lqc
Copy link

lqc commented Jun 12, 2024

If you're using pnpm you can use pnpm up braces for a more fine-grained update than deleting the whole lock file.

@jpsla94
Copy link
Author

jpsla94 commented Jun 17, 2024

Hello,

I have the latest version of micromatch 4.0.7 and braces 3.0.3. I updated through override of the dependencies. But the vulnerability still appears on the security report.

Any more tips that I can try?

@jpsla94
Copy link
Author

jpsla94 commented Jul 9, 2024

I downgraded to 4.0.6. in the meantime. Will close this topic now.

@jpsla94 jpsla94 closed this as completed Jul 9, 2024
@manstis
Copy link

manstis commented Jul 22, 2024

IIUC 4.0.7 still contains CVE-2024-4067 here.

master however seems to remedy the issue.. so waiting for a 4.0.8 😸

@paulmillr
Copy link
Member

master is not backwards compatible. it needs to be fixed in backwards compatible way by someone.

@manstis
Copy link

manstis commented Jul 22, 2024

master is not backwards compatible. it needs to be fixed in backwards compatible way by someone.

Fair enough.. I naively saw it appeared fixed on master and assumed a 4.0.8 would fix it.

Of course, if master is not backwards compatible I would not expect it to be 4.0.8 but 5.x or 4.1.x at least.

@paulmillr
Copy link
Member

5.x is not useful to release, because micromatch is rarely used on its own. It's mostly in other packages and they can't really be bothered to be broken.

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

7 participants