Publish GHSA-cvv5-9h9w-qp2m

This commit is contained in:
advisory-database[bot]
2024-12-20 19:15:10 +00:00
parent 6ca402be1f
commit db39adb876
@@ -0,0 +1,64 @@
{
"schema_version": "1.4.0",
"id": "GHSA-cvv5-9h9w-qp2m",
"modified": "2024-12-20T19:13:23Z",
"published": "2024-12-20T19:13:23Z",
"aliases": [
"CVE-2024-56334"
],
"summary": "Systeminformation has command injection vulnerability in getWindowsIEEE8021x (SSID)",
"details": "### Summary\nThe SSID is not sanitized when before it is passed as a parameter to cmd.exe in the `getWindowsIEEE8021x` function. This means that malicious content in the SSID can be executed as OS commands. \n\n### Details\nI have exploited this vulnerability in a Windows service using version 5.22.11 of the module, to escalate privileges (in an environment where I am authorized to do so). However, as far as I can see from the code, it is still present in master branch at time of writing, on line [403/404 of network.js](https://github.com/sebhildebrandt/systeminformation/blob/3a92931c7d46605ffddc1aacb97a9727273b2888/lib/network.js#L403).\n\nThe SSID is obtained from `netsh wlan show interface ...` in `getWindowsWirelessIfaceSSID`, and then passed to `cmd.exe /d /s /c \"netsh wlan show profiles ...` in `getWindowsIEEE8021x`, without sanitization.\n\n### PoC\nFirst, the command injection payload should be included in the connected Wi-Fi SSID. For example create hotspot on mobile phone or other laptop, set SSID to payload, connect to it with victim Windows system. Two example SSID's to demonstrate exploitation are below.\n\nDemonstration to run ping command indefinitely:\n```\na\" | ping /t 127.0.0.1 &\n```\n\nRun executable with privileges of the user in which vulnerable function is executed. Chosen executable should should be placed in (assuming system drive is C): `C:\\a\\a.exe`.\n```\na\" | %SystemDrive%\\a\\a.exe &\n```\n\nThen, the vulnerable function can be executed on the victim system, for example, using:\n```\nconst si = require('systeminformation');\nsi.networkInterfaces((net) => { console.log(net) });\n```\n\nNow the chosen command, `PING.exe` or `a.exe` will be run through the cmd.exe command line.\n\n### Impact\nThis vulnerability may enable an attacker, depending on how the package is used, to perform remote code execution or local privilege escalation.\n\n",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "systeminformation"
},
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "5.23.7"
}
]
}
],
"database_specific": {
"last_known_affected_version_range": "<= 5.23.6"
}
}
],
"references": [
{
"type": "WEB",
"url": "https://github.com/sebhildebrandt/systeminformation/security/advisories/GHSA-cvv5-9h9w-qp2m"
},
{
"type": "WEB",
"url": "https://github.com/sebhildebrandt/systeminformation/commit/f7af0a67b78e7894335a6cad510566a25e06ae41"
},
{
"type": "PACKAGE",
"url": "https://github.com/sebhildebrandt/systeminformation"
}
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"severity": "HIGH",
"github_reviewed": true,
"github_reviewed_at": "2024-12-20T19:13:23Z",
"nvd_published_at": null
}
}