<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://vulnerability.circl.lu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Tue, 29 Sep 2026 11:49:10 +0000</lastBuildDate>
    <item>
      <title>GHSA-5j98-mcp5-4vw2 — glob CLI: Command injection via -c/--cmd executes matches with shell:true</title>
      <link>https://vulnerability.circl.lu/vuln/ghsa-5j98-mcp5-4vw2</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: glob&lt;/p&gt;
&lt;p&gt;### Summary&lt;/p&gt;
&lt;p&gt;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 &amp;lt;command&amp;gt; &amp;lt;patterns&amp;gt;` 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.&lt;/p&gt;
&lt;p&gt;### Details&lt;/p&gt;
&lt;p&gt;**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`:&lt;/p&gt;
&lt;p&gt;```javascript
stream.on(&amp;#39;end&amp;#39;, () =&amp;gt; foregroundChild(cmd, matches, { shell: true }))
```&lt;/p&gt;
&lt;p&gt;**Technical Flow:**
1. User runs `glob -c &amp;lt;command&amp;gt; &amp;lt;pattern&amp;gt;` 
2. CLI finds files matching the pattern
3. Matched filenames are collected into an array
4. Command is executed with matched filenames as arguments using `shell: true`
5. Shell interprets metacharacters in filenames as command syntax
6. Malicious filenames execute arbitrary commands&lt;/p&gt;
&lt;p&gt;**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)&lt;/p&gt;
&lt;p&gt;**Attack Surface:**
- Files with names containing shell metacharacters: `$()`, backticks, `;`, `&amp;amp;`, `|`, etc.
- Any directory whe…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: glob&lt;/p&gt;
&lt;p&gt;### Summary&lt;/p&gt;
&lt;p&gt;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 &amp;lt;command&amp;gt; &amp;lt;patterns&amp;gt;` 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.&lt;/p&gt;
&lt;p&gt;### Details&lt;/p&gt;
&lt;p&gt;**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`:&lt;/p&gt;
&lt;p&gt;```javascript
stream.on(&amp;#39;end&amp;#39;, () =&amp;gt; foregroundChild(cmd, matches, { shell: true }))
```&lt;/p&gt;
&lt;p&gt;**Technical Flow:**
1. User runs `glob -c &amp;lt;command&amp;gt; &amp;lt;pattern&amp;gt;` 
2. CLI finds files matching the pattern
3. Matched filenames are collected into an array
4. Command is executed with matched filenames as arguments using `shell: true`
5. Shell interprets metacharacters in filenames as command syntax
6. Malicious filenames execute arbitrary commands&lt;/p&gt;
&lt;p&gt;**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)&lt;/p&gt;
&lt;p&gt;**Attack Surface:**
- Files with names containing shell metacharacters: `$()`, backticks, `;`, `&amp;amp;`, `|`, etc.
- Any directory whe…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/ghsa-5j98-mcp5-4vw2</guid>
    </item>
  </channel>
</rss>
