Fix minimatch ReDoS vulnerability (CVE-2026-27904)#2317
Conversation
Add pnpm workspace override to force minimatch@<3.1.4 to 3.1.4, eliminating the ReDoS vulnerability (GHSA-23c5-xmqv-rm74) in the transitive dependency from @stoplight/spectral-core. https://claude.ai/code/session_01P85Gv7gW1VGGaoLJKcgckx
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on enhancing the project's security posture by mitigating a critical ReDoS vulnerability found in the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly addresses a ReDoS vulnerability in the minimatch package by using a pnpm override. However, I have identified two areas for improvement. The CVE identifier in pnpm-workspace.yaml appears to be incorrect, and I've suggested a correction. Additionally, pnpm-lock.yaml contains an unrelated update to @carbon/react, which should ideally be reverted to keep this security fix focused.
| '@carbon/react': | ||
| specifier: ^1.101.0 | ||
| version: 1.101.0 | ||
| version: 1.102.0 |
There was a problem hiding this comment.
This update to @carbon/react seems unrelated to the primary goal of this PR, which is to fix a security vulnerability in minimatch. To maintain a clean and focused commit history, it's recommended to revert unrelated dependency updates. If this change is intentional and necessary, please provide context in the PR description.
| # Fix CVE-2026-27904 / GHSA-23c5-xmqv-rm74: minimatch ReDoS vulnerability | ||
| # Transitive via @stoplight/spectral-core | ||
| "minimatch@<3.1.4": "3.1.4" |
There was a problem hiding this comment.
The CVE identifier CVE-2026-27904 appears to be incorrect. The associated GHSA GHSA-23c5-xmqv-rm74 corresponds to CVE-2022-37599. Please update the comment with the correct CVE for accurate vulnerability tracking.
# Fix CVE-2022-37599 / GHSA-23c5-xmqv-rm74: minimatch ReDoS vulnerability
# Transitive via @stoplight/spectral-core
"minimatch@<3.1.4": "3.1.4"Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Summary
Add pnpm override to fix CVE-2026-27904 / GHSA-23c5-xmqv-rm74, a ReDoS vulnerability in minimatch. The vulnerability is transitive via @stoplight/spectral-core and is resolved by enforcing minimatch version 3.1.4 or higher.
Linked Issues
Documentation
https://claude.ai/code/session_01P85Gv7gW1VGGaoLJKcgckx