wifi sanitizing ssid names
This commit is contained in:
parent
d93a0ce510
commit
7972565812
@ -57,6 +57,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">5.21.7</th>
|
||||||
|
<td>2023-09-19</td>
|
||||||
|
<td><span class="code">wifiConnections()</span> <span class="code">wifiNetworks()</span>fixed security issue (linux)</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">5.21.6</th>
|
<th scope="row">5.21.6</th>
|
||||||
<td>2023-09-18</td>
|
<td>2023-09-18</td>
|
||||||
|
|||||||
@ -166,11 +166,11 @@
|
|||||||
<body>
|
<body>
|
||||||
<header class="bg-image-full">
|
<header class="bg-image-full">
|
||||||
<div class="top-container">
|
<div class="top-container">
|
||||||
<a href="security.html" class="recommendation">Security advisory:<br>Update to v5.6.13</a>
|
<a href="security.html" class="recommendation">Security advisory:<br>Update to v5.21.7</a>
|
||||||
<img class="logo" src="assets/logo.png" alt="logo">
|
<img class="logo" src="assets/logo.png" alt="logo">
|
||||||
<div class="title">systeminformation</div>
|
<div class="title">systeminformation</div>
|
||||||
<div class="subtitle"><span id="typed"></span> </div>
|
<div class="subtitle"><span id="typed"></span> </div>
|
||||||
<div class="version">New Version: <span id="version">5.21.6</span></div>
|
<div class="version">New Version: <span id="version">5.21.7</span></div>
|
||||||
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
|
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="down">
|
<div class="down">
|
||||||
|
|||||||
@ -49,6 +49,24 @@
|
|||||||
<p class="warning">This can lead to serious impact on your servers!</p>
|
<p class="warning">This can lead to serious impact on your servers!</p>
|
||||||
<p>We highly recommend to always upgrade to the latest version of our package. We maintain security updates for version 5 AND also version 4. For version 4 you can install latest version by placing <span class="code">"systeminformation": "^4"</span> in your package.json (dependencies) and run <span class="code">npm install</span></p>
|
<p>We highly recommend to always upgrade to the latest version of our package. We maintain security updates for version 5 AND also version 4. For version 4 you can install latest version by placing <span class="code">"systeminformation": "^4"</span> in your package.json (dependencies) and run <span class="code">npm install</span></p>
|
||||||
|
|
||||||
|
<h2>SSID Command Injection Vulnerability</h2>
|
||||||
|
<p><span class="bold">Affected versions:</span>
|
||||||
|
< 5.21.07 and < 4.34.22<br>
|
||||||
|
<span class="bold">Date:</span> 2023-09-19<br>
|
||||||
|
<span class="bold">CVE indentifier</span> -
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h4>Impact</h4>
|
||||||
|
<p>We had an issue that there was a possibility to perform a potential command injection possibility by crafting detected SSIDs in <span class="code">wifiConnections()</span>, <span class="code">wifiNetworks()</span>.</p>
|
||||||
|
|
||||||
|
<h4>Patch</h4>
|
||||||
|
<p>Problem was fixed with parameter checking. Please upgrade to version >= 5.7.21 (or >= 4.34.22 if you are using version 4).</p>
|
||||||
|
|
||||||
|
<h4>Workaround</h4>
|
||||||
|
<p>If you cannot upgrade, be sure to check or sanitize parameter strings that are passed to <span class="code">wifiConnections()</span>, <span class="code">wifiNetworks()</span> (string only)</p>
|
||||||
|
<hr>
|
||||||
|
<br>
|
||||||
|
|
||||||
<h2>Command Injection Vulnerability</h2>
|
<h2>Command Injection Vulnerability</h2>
|
||||||
<p><span class="bold">Affected versions:</span>
|
<p><span class="bold">Affected versions:</span>
|
||||||
< 5.6.13 and < 4.34.21<br>
|
< 5.6.13 and < 4.34.21<br>
|
||||||
|
|||||||
10
lib/wifi.js
10
lib/wifi.js
@ -549,7 +549,15 @@ function wifiConnections(callback) {
|
|||||||
const wpaDetails = wpaConnectionLinux(ifaceSanitized);
|
const wpaDetails = wpaConnectionLinux(ifaceSanitized);
|
||||||
const ssid = nmiDetails.ssid || wpaDetails.ssid;
|
const ssid = nmiDetails.ssid || wpaDetails.ssid;
|
||||||
const network = networkList.filter(nw => nw.ssid === ssid);
|
const network = networkList.filter(nw => nw.ssid === ssid);
|
||||||
const nmiConnection = nmiConnectionLinux(ssid);
|
let ssidSanitized = '';
|
||||||
|
const t = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(ssid, true);
|
||||||
|
for (let i = 0; i <= util.mathMin(t.length, 2000); i++) {
|
||||||
|
if (t[i] !== undefined) {
|
||||||
|
ssidSanitized = ssidSanitized + t[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const nmiConnection = nmiConnectionLinux(ssidSanitized);
|
||||||
const channel = network && network.length && network[0].channel ? network[0].channel : (wpaDetails.channel ? wpaDetails.channel : null);
|
const channel = network && network.length && network[0].channel ? network[0].channel : (wpaDetails.channel ? wpaDetails.channel : null);
|
||||||
const bssid = network && network.length && network[0].bssid ? network[0].bssid : (wpaDetails.bssid ? wpaDetails.bssid : null);
|
const bssid = network && network.length && network[0].bssid ? network[0].bssid : (wpaDetails.bssid ? wpaDetails.bssid : null);
|
||||||
if (ssid && bssid) {
|
if (ssid && bssid) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user