CVE-2026-116674: systeminformation has prototype pollution in `networkStats()` via the interface name
The npm package systeminformation (5.x up to 5.33.12) has a prototype pollution flaw in `networkStats()`. If an application passes untrusted input as the interface name, the name `__proto__` makes the library write network statistics onto `Object.prototype`. Only FreeBSD, OpenBSD and NetBSD hosts are reachable. Upgrade to 5.33.13.
Published Oct 28, 2026 · Analysis Nov 1, 2026
What an attacker can do
lib/network.js keeps a speed cache in a plain object, const _network = {}, and calcNetworkSpeed() indexes it with the caller's interface name. The name goes through util.sanitizeString(iface, true), but that filter only strips shell metacharacters, so __proto__ passes unchanged. _network['__proto__'] returns Object.prototype, which is truthy, so the guard that creates a fresh entry never runs. The following assignments then write rx_bytes, tx_bytes, rx_sec, tx_sec, ms, last_ms and operstate onto Object.prototype.
The attacker needs an application that forwards user-controlled text to the ifaces argument of si.networkStats(), running on a BSD. On Linux, macOS and Windows, other checks return early and nothing is polluted. The attacker picks which property names appear only in the sense that the library fixes them. They cannot choose the values, which come from interface counters.
The effect depends on the application. Code that tests if (obj.operstate) or if (obj.ms) on a plain object takes the wrong branch. for...in loops see seven extra keys. Lookup maps checked with in can return keys that were never inserted. The advisory knows of no path to remote code execution. It also says the BSD result comes from reading the code and was not tested on a BSD host.
Who is affected
All 5.x releases up to and including 5.33.12 are affected (< 5.33.13). Earlier major lines have the same pattern but are end of life. You are exposed only if your code passes untrusted input to si.networkStats() as the interface argument and runs on FreeBSD, OpenBSD or NetBSD. Calls with '*' or no argument are not affected, because the names come from the system.
Check the installed version:
npm ls systeminformationsysteminformation
- Ecosystem
- npm
- Affected
- < 5.33.13
- Fixed in
- 5.33.13
- Check
npm ls systeminformation
How to fix it
Upgrade to systeminformation 5.33.13:
npm install [email protected]The fix changes the cache to const _network = Object.create(null);, so __proto__ becomes an ordinary key. If you cannot upgrade yet, the advisory gives two workarounds. Accept only interface names returned by si.networkInterfaces(), or reject __proto__, constructor and prototype. Or never pass untrusted input as the ifaces argument. Freezing Object.prototype also blocks the write but can break other dependencies, so the advisory does not recommend it.
How to tell if you were hit
Search your code for calls to networkStats( and trace where the argument comes from. Any path from a request parameter, CLI flag or message to that argument is exposure. At runtime on a BSD host, check whether a plain object has properties it should not, for example ({}).operstate !== undefined or ({}).rx_sec !== undefined. Request logs containing __proto__ or constructor as an interface name point to probing. Run npm ls systeminformation across your projects to find vulnerable copies, including transitive ones.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
networkStats() keeps a per interface cache for computing rx_sec / tx_sec between calls. The cache is a plain JavaScript object and is indexed with the interface name the caller supplied. Passing the name __proto__ makes every cache write land on Object.prototype instead of the cache, polluting every object in the Node.js process.
An application is affected if it passes untrusted input as the ifaces argument of si.networkStats() and runs on FreeBSD, OpenBSD or NetBSD.
Details
The vulnerable code
lib/network.js declares the cache as a plain object:
const _network = {};calcNetworkSpeed() writes into it, keyed by the interface name:
} else {
if (!_network[iface]) {
_network[iface] = {};
}
_network[iface].rx_bytes = rx_bytes;
_network[iface].tx_bytes = tx_bytes;
_network[iface].rx_sec = null;
_network[iface].tx_sec = null;
_network[iface].ms = Date.now();
_network[iface].last_ms = 0;
_network[iface].operstate = operstate;
}With iface === '__proto__' this misbehaves twice:
_network['__proto__']does not read a missing own property — it invokes the inherited__proto__getter and returnsObject.prototype, which is truthy. Theif (!_network[iface])guard therefore never creates the{}placeholder.- Each following assignment writes onto
Object.prototype.
After one call, rx_bytes, tx_bytes, rx_sec, tx_sec, ms, last_ms and operstate are visible on every object in the process. A second call takes the other branch (_network['__proto__'].ms is now truthy) and keeps them updated.
Why the existing sanitizing does not help
The interface name does pass through util.sanitizeString(iface, true) before it is used as the cache key. That function is a shell metacharacter filter, built to stop command injection in the netstat / ifconfig invocations — a different threat. Property names made of letters and underscores are legitimate interface names and pass through untouched:
"a;id" -> "aid"
"a$(id)" -> "aid"
"a|id" -> "aid"
"a`id`" -> "aid"
"__proto__" -> "__proto__" <-- unchanged
"constructor" -> "constructor" <-- unchangedThe sanitizer is doing its job; the gap is that no layer treats the value as an *object key*.
Reachability
The cache write is guarded incidentally on three of four platform branches. These guards exist for unrelated reasons and are not a deliberate defence:
| Platform | Code path | Reachable with an arbitrary name? |
| Linux / Android | `fs.existsSync('/sys/class/net/' + ifaceSanitized)` | **No** — a non-existent interface returns early |
| macOS | requires `netstat` to emit a data row beyond the header | **No** — verified on macOS 27, `Object.prototype` stays clean |
| Windows | `if (rx_bytes && tx_bytes)` — requires a real adapter match | **No** |
| **FreeBSD / OpenBSD / NetBSD** | `if (!error) { …; result = calcNetworkSpeed(ifaceSanitized, …) }` | **Yes** — the call sits outside the parsing loop, so any successful `netstat` exit reaches it, and `netstat -ibndI <unknown>` prints only its header and exits `0` |The important part is not that three platforms happen to be safe, but that nothing in the design prevents the write. Any future platform branch without such a guard reopens the issue, which is why the fix is applied at the cache rather than at the call sites.
Age
The pattern predates the v5 line — git log -S "_network[iface] = {}" traces it back to a refactoring before v3.42.5. The v3 and v4 lines are end of life; the advisory covers v5.
Impact
The attacker controls which attributes appear on Object.prototype but not their values — those come from the interface statistics (rx_bytes, ms, operstate …). The attribute *names* are fixed by the library, so this is not an arbitrary-key pollution primitive.
The consequences are therefore application specific and arise from name collisions:
- Any application code that tests
if (obj.operstate),if (obj.ms)or similar on an object that should not have those properties now takes the wrong branch. for…inloops over plain objects gain seven extra enumerable keys, which can corrupt serialisation, configuration merging or validation logic.- Libraries that use
{}as a lookup map and check membership withinor truthiness can return values for keys that were never inserted.
No path to remote code execution is known, and the values cannot be chosen by the attacker.
Proof of concept
The underlying primitive (any platform)
const { calcNetworkSpeed } = require('systeminformation/lib/network.js'); // internal
const cache = {}; // the declaration used by the library
calcNetworkSpeed('__proto__', 1, 2, 'up', 0, 0, 0, 0);
console.log({}.rx_bytes); // 1
console.log({}.operstate); // 'up'
console.log(Object.prototype.hasOwnProperty('rx_bytes')); // trueEnd to end through the public API (FreeBSD / OpenBSD / NetBSD)
const si = require('systeminformation');
(async () => {
console.log('before:', {}.operstate); // undefined
await si.networkStats('__proto__'); // an attacker supplied interface name
console.log('after :', {}.operstate); // 'up' -> Object.prototype is polluted
})();On Linux, macOS and Windows the same call returns an empty result set and leaves Object.prototype untouched, for the reasons in the *Reachability* table.
Patch
lib/network.js — give the cache a null prototype, so __proto__ becomes an ordinary own property instead of a setter into the prototype chain:
-const _network = {};
+const _network = Object.create(null);This is the smallest change that fixes the class of problem rather than one reachable path:
- It is independent of the platform branches, so no guard has to be added or maintained.
- It keeps behaviour identical for every legitimate interface name —
Object.keys(), member reads and writes all work unchanged on a null prototype object. - It matches the pattern already used elsewhere in the codebase (
lib/filesystem.js:114-115,lib/graphics.js:1060,lib/graphics.js:1087). Object.createis ES5.1, well below the declaredengines.node >= 10.0.0.
After the patch the hostile name is stored as a normal cache entry:
const cache = Object.create(null);
// ... cache['__proto__'] holds the stats object, Object.prototype is untouchedWorkarounds
For users who cannot upgrade immediately, either of these is sufficient:
- Validate the interface name before calling — accept only names returned by
si.networkInterfaces(), or reject the names__proto__,constructorandprototype. - Never pass untrusted input as the
ifacesargument. Passing'*'or omitting the argument is unaffected, because those names come from the system rather than the caller.
Freezing Object.prototype (Object.freeze(Object.prototype)) also prevents the write, but it has wide-reaching side effects on other dependencies and is not recommended as a general mitigation.
Affected versions
All 5.x releases up to and including 5.33.12. Earlier major lines contain the same pattern but are end of life.
What was verified, and what was not
Verified on this machine (macOS 27, Node 24):
- the pollution primitive, by calling the cache write with
iface = '__proto__'; - that
util.sanitizeString('__proto__', true)returns the string unchanged, while shell metacharacters are stripped; - that unpatched v5 on macOS does not pollute through the public API;
- that
netstat -bdnI <unknown-interface>prints only its header and exits0; - that the patch stores the hostile key as an own property and leaves
Object.prototypeclean.
Not verified, because no such host was available:
- end to end exploitation on FreeBSD, OpenBSD or NetBSD. That conclusion is derived from reading the BSD branch of
networkStatsSingle()— where thecalcNetworkSpeed()call sits outside the row parsing loop and is reached whenevernetstatexits successfully — combined with the observednetstatexit behaviour above. Worth confirming on a BSD host before publishing, since the affected-platform list depends on it.
Questions
- Does CVE-2026-116674 affect Linux, macOS or Windows?
Not through the public API. On those platforms the code returns early for an unknown interface, or needs a real adapter match, so
Object.prototypestays clean. The advisory notes this is an incidental guard, not a designed defence. Only FreeBSD, OpenBSD and NetBSD reach the cache write.- Can this lead to remote code execution?
The advisory knows of no path to code execution. The attacker cannot choose the polluted values, and the property names are fixed by the library. Impact depends on how your code reads properties from plain objects.
- Do I need to upgrade if I only call networkStats() without arguments?
The flaw is not reachable if the interface name never comes from untrusted input. Passing
'*'or nothing is unaffected. Upgrading to 5.33.13 is still cheap and removes the risk if the code changes later.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-116576
systeminformation vulnerable to Windows command injection in services() through Unicode quotation marks
high7.8Oct 28, 2026CVE-2026-116673
systeminformation has path traversal in Linux networkStats() that allows symlink-based file disclosure outside /sys/class/net
low3.3Oct 28, 2026CVE-2026-50289
systeminformation: OS command injection in networkInterfaces() via interfaces(5) source-directive path on Linux
high8.7Jul 15, 2026CVE-2026-44724
Systeminformation vulnerable to Linux command injection in networkInterfaces() via unsanitized NetworkManager connection profile name
high7.8May 13, 2026CVE-2026-26280
Systeminformation has a Command Injection via unsanitized interface parameter in wifi.js retry path
high8.4Feb 18, 2026CVE-2026-26318
Command Injection via Unsanitized `locate` Output in `versions()` — systeminformation
high8.8Feb 18, 2026
