Skip to content

Fix minimatch ReDoS vulnerability (CVE-2026-27904)#2317

Merged
JanPokorny merged 2 commits intomainfrom
claude/fix-minimatch-redos-1K5rM
Mar 9, 2026
Merged

Fix minimatch ReDoS vulnerability (CVE-2026-27904)#2317
JanPokorny merged 2 commits intomainfrom
claude/fix-minimatch-redos-1K5rM

Conversation

@JanPokorny
Copy link
Collaborator

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

  • No Docs Needed: This is a security vulnerability fix in dependency management configuration.

https://claude.ai/code/session_01P85Gv7gW1VGGaoLJKcgckx

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
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 6, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 minimatch package. The fix involves strategically applying a package manager override to ensure that a secure version of minimatch is used across the project's dependencies, thereby preventing potential denial-of-service attacks stemming from malicious regular expression inputs.

Highlights

  • Security Vulnerability Fix: Addressed a Regular Expression Denial of Service (ReDoS) vulnerability (CVE-2026-27904 / GHSA-23c5-xmqv-rm74) in the minimatch package.
  • Dependency Override: Implemented a pnpm override to enforce minimatch version 3.1.4 or higher, resolving the transitive vulnerability via @stoplight/spectral-core.
  • Dependency Update: Updated the @carbon/react dependency from version 1.101.0 to 1.102.0 in the lockfile.

🧠 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
  • pnpm-lock.yaml
    • Updated @carbon/react dependency from 1.101.0 to 1.102.0.
    • Added an override for minimatch to enforce version 3.1.4.
    • Removed the explicit minimatch@3.1.2 entry from the packages section.
    • Updated minimatch version references within snapshots to 3.1.4.
  • pnpm-workspace.yaml
    • Added a pnpm override for minimatch@<3.1.4 to 3.1.4 to address the ReDoS vulnerability.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Comment on lines +5 to +7
# Fix CVE-2026-27904 / GHSA-23c5-xmqv-rm74: minimatch ReDoS vulnerability
# Transitive via @stoplight/spectral-core
"minimatch@<3.1.4": "3.1.4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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>
@JanPokorny JanPokorny merged commit 977a513 into main Mar 9, 2026
6 of 7 checks passed
@JanPokorny JanPokorny deleted the claude/fix-minimatch-redos-1K5rM branch March 9, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants