GHSA-3f7j-7jwc-fxfj: OS Command Injection

Published Oct 28, 2026
·
Updated

Summary

On Windows, systeminformation@5.33.15 builds a PowerShell command using the value passed to services(). The default sanitizer removes ASCII quotes but keeps Unicode curly quotes, spaces, and parentheses. A crafted service name can use those characters to break out of the generated filter string and run a PowerShell expression. The expression runs with the permissions of the Node.js process.

This report confirms version 5.33.15. Other package versions have not been checked.

Details

In lib/processes.js, services() sanitizes the caller's string with sanitizeShellString() and later inserts each resulting name into a Get-CimInstance Win32Service -Filter command. The Windows branch passes that command to util.powerShell().

The sanitizer in lib/util.js removes the ASCII double quote, but it does not remove U+201C or U+201D, the left and right curly double quotation marks. It also permits spaces and parentheses when called in its default, non-strict mode. PowerShell accepts the curly marks as string delimiters, so an input can end the filter string and place a command expression in the generated command.

For example, the input below uses curly quotation marks to end the generated filter string and execute New-Item. I reproduced this call on Windows against the checked-out systeminformation@5.33.15 source; it created a marker file with the Node.js process account.

Proof of concept

Run this on Windows in a disposable directory with Node.js and PowerShell available:

powershell mkdir si-command-injection-repro cd si-command-injection-repro npm init -y npm install systeminformation@5.33.15

Save the following as poc.cjs, then run node poc.cjs:

js 'use strict';

const fs = require('node:fs'); const path = require('node:path'); const si = require('systeminformation');

(async () => { const markerName = si-injection-${process.pid}.txt; const markerPath = path.join(process.cwd(), markerName); fs.rmSync(markerPath, { force: true });

try { await si.services(not-a-service” (New-Item -Name ${markerName} -ItemType File -Force) “); console.log(markerCreated=${fs.existsSync(markerPath)}); } finally { fs.rmSync(markerPath, { force: true }); } })().catch((error) => { console.error(error); process.exitCode = 1; });

Expected output:

text markerCreated=true

The Windows run returned an array and created the marker (markerCreated: true). A benign input left the marker absent. The script removes the marker afterward. I did not identify an application network route that forwards remote input to services(), so remote exploitability depends on the consuming application.

Impact

An application that passes attacker-controlled input to services() on Windows can execute PowerShell commands with the Node.js process account's permissions. Depending on that account, commands may read or change accessible files, alter application data, or disrupt the service. I searched this repository for HTTP servers, route handlers, and listener calls and found none. services() is exposed through the package API and getDynamicData(), so a consuming application could make the input network-reachable if it forwards request data. A separate loopback HTTP harness did trigger the command through a query parameter, but that server was test code and is not part of this repository. The project's docs/security.html already warns that arbitrary untrusted input to services() needs caution because package sanitization does not cover every case.

Affected Software

1 affected componentFixes available
npm/systeminformation<5.33.16
5.33.16

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/systeminformation to a version that resolves this vulnerability.

    Fixed in 5.33.16

Event History

Oct 28, 2026
Advisory Published
via GitHub·10:42 PM
Data Sourced
via GitHub·10:42 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Windows deployments using systeminformation version 5.33.15 are exposed when application-controlled or otherwise untrusted input is passed to services(). The injected PowerShell expression runs with the permissions of the Node.js process.

2

What does an attacker need to exploit it?

An attacker needs the ability to influence the service name value supplied to services(). The crafted value uses Unicode left or right curly quotation marks, along with permitted spaces and parentheses, to escape the generated PowerShell filter string.

3

Are other systeminformation versions known to be affected?

The report confirms version 5.33.15 only. Other package versions were not checked.

4

How can I assess whether my application is vulnerable?

Check whether the application runs on Windows, depends on systeminformation 5.33.15, and passes untrusted values to services(). Inputs containing U+201C or U+201D curly quotation marks are relevant because the documented sanitizer removes ASCII double quotes but retains those characters.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203