<?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 22:33:47 +0000</lastBuildDate>
    <item>
      <title>GHSA-r275-fr43-pm7q — simple-git has blockUnsafeOperationsPlugin bypass via case-insensitive protocol.allow config key enables RCE</title>
      <link>https://vulnerability.circl.lu/vuln/ghsa-r275-fr43-pm7q</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: simple-git&lt;/p&gt;
&lt;p&gt;### Summary&lt;/p&gt;
&lt;p&gt;The `blockUnsafeOperationsPlugin` in `simple-git` fails to block git protocol
override arguments when the config key is passed in uppercase or mixed case.
An attacker who controls arguments passed to git operations can enable the
`ext::` protocol by passing `-c PROTOCOL.ALLOW=always`, which executes an
arbitrary OS command on the host machine.&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;### Details&lt;/p&gt;
&lt;p&gt;The `preventProtocolOverride` function in
`simple-git/src/lib/plugins/block-unsafe-operations-plugin.ts` (line 24)
checks whether a `-c` argument configures `protocol.allow` using this regex:&lt;/p&gt;
&lt;p&gt;```ts
if (!/^\s*protocol(.[a-z]+)?.allow/.test(next)) {
   return;
}
```&lt;/p&gt;
&lt;p&gt;This regex is case-sensitive. Git treats config key names
case-insensitively — it normalises them to lowercase internally.
As a result, passing `PROTOCOL.ALLOW=always`, `Protocol.Allow=always`,
or any mixed-case variant is not matched by the regex, the check
returns without throwing, and git is spawned with the unsafe argument.&lt;/p&gt;
&lt;p&gt;**Verification that git normalises the key:**&lt;/p&gt;
&lt;p&gt;```bash
$ git -c PROTOCOL.ALLOW=always config --list | grep protocol
protocol.allow=always
```&lt;/p&gt;
&lt;p&gt;**The fix is a single character — add the `/i` flag:**&lt;/p&gt;
&lt;p&gt;```ts
// Before (vulnerable):
if (!/^\s*protocol(.[a-z]+)?.allow/.test(next)) {&lt;/p&gt;
&lt;p&gt;// After (fixed):
if (!/^\s*protocol(.[a-z]+)?.allow/i.test(next)) {
```&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;## poc.js&lt;/p&gt;
&lt;p&gt;```js
/**
 * Proof of Concept — simple-git preventProtocolOverride Case-Sensitivity Bypass
 *
 * CVE-2022-25912 was fixed in simple-git@3.15.0 by adding…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: simple-git&lt;/p&gt;
&lt;p&gt;### Summary&lt;/p&gt;
&lt;p&gt;The `blockUnsafeOperationsPlugin` in `simple-git` fails to block git protocol
override arguments when the config key is passed in uppercase or mixed case.
An attacker who controls arguments passed to git operations can enable the
`ext::` protocol by passing `-c PROTOCOL.ALLOW=always`, which executes an
arbitrary OS command on the host machine.&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;### Details&lt;/p&gt;
&lt;p&gt;The `preventProtocolOverride` function in
`simple-git/src/lib/plugins/block-unsafe-operations-plugin.ts` (line 24)
checks whether a `-c` argument configures `protocol.allow` using this regex:&lt;/p&gt;
&lt;p&gt;```ts
if (!/^\s*protocol(.[a-z]+)?.allow/.test(next)) {
   return;
}
```&lt;/p&gt;
&lt;p&gt;This regex is case-sensitive. Git treats config key names
case-insensitively — it normalises them to lowercase internally.
As a result, passing `PROTOCOL.ALLOW=always`, `Protocol.Allow=always`,
or any mixed-case variant is not matched by the regex, the check
returns without throwing, and git is spawned with the unsafe argument.&lt;/p&gt;
&lt;p&gt;**Verification that git normalises the key:**&lt;/p&gt;
&lt;p&gt;```bash
$ git -c PROTOCOL.ALLOW=always config --list | grep protocol
protocol.allow=always
```&lt;/p&gt;
&lt;p&gt;**The fix is a single character — add the `/i` flag:**&lt;/p&gt;
&lt;p&gt;```ts
// Before (vulnerable):
if (!/^\s*protocol(.[a-z]+)?.allow/.test(next)) {&lt;/p&gt;
&lt;p&gt;// After (fixed):
if (!/^\s*protocol(.[a-z]+)?.allow/i.test(next)) {
```&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;## poc.js&lt;/p&gt;
&lt;p&gt;```js
/**
 * Proof of Concept — simple-git preventProtocolOverride Case-Sensitivity Bypass
 *
 * CVE-2022-25912 was fixed in simple-git@3.15.0 by adding…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/ghsa-r275-fr43-pm7q</guid>
    </item>
  </channel>
</rss>
