Skip to content

Fix minimatch ReDoS vulnerability (CVE-2026-27903)#2321

Merged
JanPokorny merged 2 commits intomainfrom
claude/fix-minimatch-redos-crTZs
Mar 6, 2026
Merged

Fix minimatch ReDoS vulnerability (CVE-2026-27903)#2321
JanPokorny merged 2 commits intomainfrom
claude/fix-minimatch-redos-crTZs

Conversation

@JanPokorny
Copy link
Collaborator

Summary

Add pnpm override to fix CVE-2026-27903 / GHSA-7r86-cg39-jmmj, 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 patch that updates a transitive dependency constraint in the workspace configuration.

https://claude.ai/code/session_01SsMomKnukR5m2q7cC1pjJ6

Add pnpm override to force minimatch@<3.1.3 to resolve to 3.1.4,
which patches the combinatorial backtracking ReDoS in matchOne()
(GHSA-7r86-cg39-jmmj). The vulnerable 3.1.2 version was a transitive
dependency via @stoplight/spectral-core.

https://claude.ai/code/session_01SsMomKnukR5m2q7cC1pjJ6
@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 resolving a critical ReDoS vulnerability. It introduces a specific dependency override to ensure that a secure version of minimatch is used across the project, thereby mitigating potential denial-of-service attacks stemming from this transitive dependency.

Highlights

  • Security Fix: Addressed CVE-2026-27903, a ReDoS vulnerability in the minimatch package, which was a transitive dependency via `@stoplight/spectral-core.
  • Dependency Override: Implemented a pnpm override to enforce minimatch version 3.1.4 or higher, ensuring the vulnerable versions are not used.
  • Lockfile Update: Updated pnpm-lock.yaml to reflect the new minimatch version and removed the outdated minimatch@3.1.2 entry.

🧠 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 the version of @carbon/react from 1.101.0 to 1.102.0.
    • Added a new override for minimatch@<3.1.3 to enforce version 3.1.4.
    • Removed the explicit entry for minimatch@3.1.2 from the packages section.
    • Updated the minimatch version reference in the snapshots section from 3.1.2 to 3.1.4.
    • Removed the minimatch@3.1.2 dependencies entry from the snapshots section.
  • pnpm-workspace.yaml
    • Added a new override rule for minimatch@<3.1.3 to 3.1.4, including comments explaining the fix for CVE-2026-27903.
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 reported ReDoS vulnerability in the minimatch package by adding a pnpm override to enforce version 3.1.4. The changes correctly update pnpm-workspace.yaml to define the override and pnpm-lock.yaml to reflect the new dependency resolution. My review includes a comment to correct the vulnerability identifiers in the pnpm-workspace.yaml file, as the current ones appear to be incorrect. This is important for long-term maintainability and security tracking. I also recommend updating the PR title and description to reflect the correct vulnerability information.

# Fix CVE-2024-45296 / GHSA-9wv6-86v2-598j: path-to-regexp ReDoS vulnerability
# Transitive via mintlify -> @mintlify/previewing -> express@4.18.2
"path-to-regexp@<0.1.10": "0.1.10"
# Fix CVE-2026-27903 / GHSA-7r86-cg39-jmmj: minimatch ReDoS vulnerability
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 vulnerability identifiers in this comment are incorrect. CVE-2026-27903 is not a valid CVE, likely due to a typo in the year. The referenced GHSA-7r86-cg39-jmmj corresponds to CVE-2022-3517 and affects minimatch versions < 3.0.5, while the lockfile indicates version 3.1.2 was in use. Incorrect identifiers hinder security auditing. The comment should be updated with the correct identifiers, or the incorrect ones should be removed.

  # Fix minimatch ReDoS vulnerability

Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
@JanPokorny JanPokorny merged commit 13aca04 into main Mar 6, 2026
6 of 7 checks passed
@JanPokorny JanPokorny deleted the claude/fix-minimatch-redos-crTZs branch March 6, 2026 22:07
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