Pin glob@10 to 10.5.0 to remediate GHSA-5j98-mcp5-4vw2 (CVE-2025-64756)#2003
Draft
mikeharder with Copilot wants to merge 2 commits into
Draft
Pin glob@10 to 10.5.0 to remediate GHSA-5j98-mcp5-4vw2 (CVE-2025-64756)#2003mikeharder with Copilot wants to merge 2 commits into
glob@10 to 10.5.0 to remediate GHSA-5j98-mcp5-4vw2 (CVE-2025-64756)#2003mikeharder with Copilot wants to merge 2 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix command injection vulnerability in glob CLI
Pin Jun 24, 2026
glob@10 to 10.5.0 to remediate GHSA-5j98-mcp5-4vw2 (CVE-2025-64756)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dependabot flagged
glob@10.4.5inpnpm-lock.yamlfor a high-severity command-injection issue in the CLI-only-c/--cmdexecution path. This PR updates the vulnerable resolution to the minimum patched version (10.5.0) with minimal dependency graph churn.Vulnerability context
globCLI command execution (shell:true) when processing attacker-controlled filenames via-c/--cmd.glob@10.4.5from transitive Jest dependencies.Dependency remediation
package.json:pnpm.overrides["glob@10"] = "10.5.0"pnpm-lock.yamlvia pnpm soglob@10.4.5is replaced byglob@10.5.0.Reachability assessment
globCLI with-c/--cmd,--cmd-arg, or related shell-exec flags.Original prompt
This section details the Dependabot vulnerability alert you should resolve
<alert_title>glob CLI: Command injection via -c/--cmd executes matches with shell:true</alert_title>
<alert_description>### Summary
The glob CLI contains a command injection vulnerability in its
-c/--cmdoption that allows arbitrary command execution when processing files with malicious names. Whenglob -c <command> <patterns>is used, matched filenames are passed to a shell withshell: true, enabling shell metacharacters in filenames to trigger command injection and achieve arbitrary code execution under the user or CI account privileges.Details
Root Cause:
The vulnerability exists in
src/bin.mts:277where the CLI collects glob matches and executes the supplied command usingforegroundChild()withshell: true:Technical Flow:
glob -c <command> <pattern>shell: trueAffected Component:
glob(),globSync(), streams/iterators) is not affectedAttack Surface:
$(), backticks,;,&,|, etc.glob -con untrusted contentPoC
Setup Malicious File:
Trigger Vulnerability:
Result:
$(touch injected_poc)in the filename is evaluated by the shellinjected_pocis created, proving command executionAdvanced Payload Examples:
Data Exfiltration:
Reverse Shell:
Environment Variable Harvesting:
Impact
Arbitrary Command Execution:
Real-World Attack Scenarios:
1. CI/CD Pipeline Compromise:
glob -cto process files (linting, testing, deployment)2. Developer Workstation Attack:
glob -cfor file processing3. Automated Processing Systems:
4. Supply Chain Poisoning:
Platform-Specific Risks:
Affected Products
src/bin.mts)-c/--cmdoption)Scope Limitation: