<?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>Mon, 28 Sep 2026 16:04:25 +0000</lastBuildDate>
    <item>
      <title>GHSA-5vv4-hvf7-2h46 — Command Injection via Unsanitized `locate` Output in `versions()` — systeminformation</title>
      <link>https://vulnerability.circl.lu/vuln/ghsa-5vv4-hvf7-2h46</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: systeminformation&lt;/p&gt;
&lt;p&gt;# Command Injection via Unsanitized `locate` Output in `versions()` — systeminformation&lt;/p&gt;
&lt;p&gt;**Package:** systeminformation (npm)  
**Tested Version:** 5.30.7  
**Affected Platform:** Linux  
**Author:** Sebastian Hildebrandt  
**Weekly Downloads:** ~5,000,000+  
**Repository:** https://github.com/sebhildebrandt/systeminformation  
**Severity:** Medium  
**CWE:** CWE-78 (OS Command Injection)&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;### The Vulnerable Code Path&lt;/p&gt;
&lt;p&gt;Inside the `versions()` function, when detecting the PostgreSQL version on Linux, the code does this:&lt;/p&gt;
&lt;p&gt;```javascript
// lib/osinfo.js — lines 770-776&lt;/p&gt;
&lt;p&gt;exec(&amp;#39;locate bin/postgres&amp;#39;, (error, stdout) =&amp;gt; {
  if (!error) {
    const postgresqlBin = stdout.toString().split(&amp;#39;\n&amp;#39;).sort();
    if (postgresqlBin.length) {
      exec(postgresqlBin[postgresqlBin.length - 1] + &amp;#39; -V&amp;#39;, (error, stdout) =&amp;gt; {
        // parses version string...
      });
    }
  }
});
```&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s what happens step by step:&lt;/p&gt;
&lt;p&gt;1. It runs `locate bin/postgres` to search the filesystem for PostgreSQL binaries
2. It splits the output by newline and sorts the results alphabetically
3. It takes the **last element** (highest alphabetically)
4. It concatenates that path directly into a new `exec()` call with `+ &amp;#39; -V&amp;#39;`&lt;/p&gt;
&lt;p&gt;**No `sanitizeShellString()`. No path validation. No `execFile()`. Raw string concatenation into `exec()`.**&lt;/p&gt;
&lt;p&gt;The `locate` command reads from a system-wide database (`plocate.db` or `mlocate.db`) that indexes all filenames on the system. If any indexed filename contains shell metachar…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: systeminformation&lt;/p&gt;
&lt;p&gt;# Command Injection via Unsanitized `locate` Output in `versions()` — systeminformation&lt;/p&gt;
&lt;p&gt;**Package:** systeminformation (npm)  
**Tested Version:** 5.30.7  
**Affected Platform:** Linux  
**Author:** Sebastian Hildebrandt  
**Weekly Downloads:** ~5,000,000+  
**Repository:** https://github.com/sebhildebrandt/systeminformation  
**Severity:** Medium  
**CWE:** CWE-78 (OS Command Injection)&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;### The Vulnerable Code Path&lt;/p&gt;
&lt;p&gt;Inside the `versions()` function, when detecting the PostgreSQL version on Linux, the code does this:&lt;/p&gt;
&lt;p&gt;```javascript
// lib/osinfo.js — lines 770-776&lt;/p&gt;
&lt;p&gt;exec(&amp;#39;locate bin/postgres&amp;#39;, (error, stdout) =&amp;gt; {
  if (!error) {
    const postgresqlBin = stdout.toString().split(&amp;#39;\n&amp;#39;).sort();
    if (postgresqlBin.length) {
      exec(postgresqlBin[postgresqlBin.length - 1] + &amp;#39; -V&amp;#39;, (error, stdout) =&amp;gt; {
        // parses version string...
      });
    }
  }
});
```&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s what happens step by step:&lt;/p&gt;
&lt;p&gt;1. It runs `locate bin/postgres` to search the filesystem for PostgreSQL binaries
2. It splits the output by newline and sorts the results alphabetically
3. It takes the **last element** (highest alphabetically)
4. It concatenates that path directly into a new `exec()` call with `+ &amp;#39; -V&amp;#39;`&lt;/p&gt;
&lt;p&gt;**No `sanitizeShellString()`. No path validation. No `execFile()`. Raw string concatenation into `exec()`.**&lt;/p&gt;
&lt;p&gt;The `locate` command reads from a system-wide database (`plocate.db` or `mlocate.db`) that indexes all filenames on the system. If any indexed filename contains shell metachar…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/ghsa-5vv4-hvf7-2h46</guid>
    </item>
  </channel>
</rss>
