Skip to content

GHSA-gx6r-qc2v-3p3v CVE-2023-42810

systeminformation SSID Command Injection Vulnerability

Critical npm
Severity
9.8 / 10
Critical · CVSS 3.1
Exploit chance (EPSS)
2.22%
Chance of exploitation in the next 30 days. Higher than 82.65% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection')
Fix
5.21.7
Upgrade systeminformation to this version or later

Description

Impact

SSID Command Injection Vulnerability

Patches

Problem was fixed with a parameter check. Please upgrade to version >= 5.21.7, Version 4 was not affected

Workarounds

If you cannot upgrade, be sure to check or sanitize parameter strings that are passed to wifiConnections(), wifiNetworks() (string only)

References

See also https://systeminformation.io/security.html

Affected versions

npm

PackageVulnerableFixed in
systeminformation
>= 5.0.0, < 5.21.7
5.21.7

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

systeminformation npm → 5.21.7

npm
npm install systeminformation@5.21.7
yarn
yarn add systeminformation@5.21.7
pnpm
pnpm add systeminformation@5.21.7

Severity breakdown

CVSS 3.1 9.8

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Weakness

CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')

The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.

How to prevent it
  • Architecture and Design: If at all possible, use library calls rather than external processes to recreate the desired functionality.
  • Implementation: If possible, ensure that all external commands called from the program are statically created.
  • Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • Operation: Run time: Run time policy enforcement may be used in an allowlist fashion to prevent use of any non-sanctioned commands.
  • System Configuration: Assign permissions that prevent the user from accessing/opening privileged files.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
CVE-2021-21315
Command Injection Vulnerability
High Known exploited Also affects systeminformation
GHSA-3f7j-7jwc-fxfj
systeminformation vulnerable to Windows command injection in services() through Unicode quotation marks
High Also affects systeminformation
GHSA-4vjg-vx72-qq4g
systeminformation has path traversal in Linux networkStats() that allows symlink-based file disclosure outside /sys/class/net
Low Also affects systeminformation
GHSA-7648-jmwf-vw7j
systeminformation has prototype pollution in `networkStats()` via the interface name
Medium Also affects systeminformation
GHSA-5xpp-75jx-m839
systeminformation: OS command injection in networkInterfaces() via interfaces(5) source-directive path on Linux
High Also affects systeminformation
GHSA-hvx9-hwr7-wjj9
Systeminformation vulnerable to Linux command injection in networkInterfaces() via unsanitized NetworkManager connection profile name
High Also affects systeminformation
GHSA-5vv4-hvf7-2h46
Command Injection via Unsanitized `locate` Output in `versions()` — systeminformation
High Also affects systeminformation
GHSA-9c88-49p5-5ggf
Systeminformation has a Command Injection via unsanitized interface parameter in wifi.js retry path
High Also affects systeminformation
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor