<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-28T16:04:25.262310+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/ghsa-5vv4-hvf7-2h46</id>
    <title>GHSA-5vv4-hvf7-2h46 — Command Injection via Unsanitized `locate` Output in `versions()` — systeminformation</title>
    <updated>2026-09-28T16:04:25.872367+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> npm: systeminformation</p>
<p># Command Injection via Unsanitized `locate` Output in `versions()` — systeminformation</p>
<p>**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)</p>
<p>---</p>
<p>### The Vulnerable Code Path</p>
<p>Inside the `versions()` function, when detecting the PostgreSQL version on Linux, the code does this:</p>
<p>```javascript
// lib/osinfo.js — lines 770-776</p>
<p>exec('locate bin/postgres', (error, stdout) =&gt; {
  if (!error) {
    const postgresqlBin = stdout.toString().split('\n').sort();
    if (postgresqlBin.length) {
      exec(postgresqlBin[postgresqlBin.length - 1] + ' -V', (error, stdout) =&gt; {
        // parses version string...
      });
    }
  }
});
```</p>
<p>Here's what happens step by step:</p>
<p>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 `+ ' -V'`</p>
<p>**No `sanitizeShellString()`. No path validation. No `execFile()`. Raw string concatenation into `exec()`.**</p>
<p>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…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/ghsa-5vv4-hvf7-2h46"/>
  </entry>
</feed>
