DOS Injection Vulnerability
+Affected versions:
+ < 5.2.6 and < 4.34.10
+ Date: 2021-02-12
+ CVE indentifier -
+
Impact
+Here we had an issue that there was a possibility to perform a ping command execution for too long time. Affected commands: inetLatency().
+ +Patch
+Problem was fixed with a shell string sanitation fix. Please upgrade to version >= 5.2.6 (or >= 4.34.10 if you are using version 4).
+ +Workarround
+If you cannot upgrade, be sure to check or sanitize service parameter strings that are passed to inetLatency() (no spaces)
+Command Injection Vulnerability
Affected versions:
- < 4.31.1
- Date: 2020-12-11
- CVE indentifier CVE-2020-26274, CVE-2020-28448
+ < 4.31.1
+ Date: 2020-12-11
+ CVE indentifier CVE-2020-26274, CVE-2020-28448
Impact
@@ -59,12 +75,11 @@Workarround
If you cannot upgrade, be sure to check or sanitize service parameter strings that are passed to inetLatency()
-command injection vulnerability - prototype pollution
Affected versions:
- < 4.30.5
- Date: 2020-11-26
- CVE indentifier CVE-2020-26245
+ < 4.30.5
+ Date: 2020-11-26
+ CVE indentifier CVE-2020-26245
Impact
@@ -79,9 +94,9 @@Command Injection Vulnerability
Affected versions:
- < 4.27.11
- Date: 2020-10-26
- CVE indentifier CVE-2020-7752
+ < 4.27.11
+ Date: 2020-10-26
+ CVE indentifier CVE-2020-7752
Impact
diff --git a/docs/v4/index.html b/docs/v4/index.html index 889d63d..ace89c3 100644 --- a/docs/v4/index.html +++ b/docs/v4/index.html @@ -165,12 +165,12 @@Update to v4.31.1 + Security advisory:
Update to v4.34.10
DOS Injection Vulnerability
+Affected versions:
+ < 4.34.10
+ Date: 2021-02-12
+ CVE indentifier -
+
Impact
+Here we had an issue that there was a possibility to perform a ping command execution for too long time. Affected commands: inetLatency().
+ +Patch
+Problem was fixed with a shell string sanitation fix. Please upgrade to version >= 4.34.10 if you are using version 4.
+ +Workarround
+If you cannot upgrade, be sure to check or sanitize service parameter strings that are passed to inetLatency() (no spaces)
+Command Injection Vulnerability
Affected versions:
< 4.31.1
diff --git a/lib/internet.js b/lib/internet.js
index 1d815ba..ab28f14 100644
--- a/lib/internet.js
+++ b/lib/internet.js
@@ -35,12 +35,9 @@ function inetChecksite(url, callback) {
return new Promise((resolve) => {
process.nextTick(() => {
let urlSanitized = '';
- const s = util.sanitizeShellString(url);
+ const s = util.sanitizeShellString(url, true);
for (let i = 0; i <= 2000; i++) {
- if (!(s[i] === undefined ||
- s[i] === ' ' ||
- s[i] === '{' ||
- s[i] === '}')) {
+ if (!(s[i] === undefined)) {
s[i].__proto__.toLowerCase = util.stringToLower;
const sl = s[i].toLowerCase();
if (sl && sl[0] && !sl[1]) {
@@ -126,7 +123,18 @@ function inetLatency(host, callback) {
}
host = host || '8.8.8.8';
- const hostSanitized = (util.isPrototypePolluted() ? '8.8.8.8' : util.sanitizeShellString(host)).trim();
+ let hostSanitized = '';
+ const s = (util.isPrototypePolluted() ? '8.8.8.8' : util.sanitizeShellString(host, true)).trim();
+ for (let i = 0; i <= 2000; i++) {
+ if (!(s[i] === undefined)) {
+
+ s[i].__proto__.toLowerCase = util.stringToLower;
+ const sl = s[i].toLowerCase();
+ if (sl && sl[0] && !sl[1]) {
+ hostSanitized = hostSanitized + sl[0];
+ }
+ }
+ }
return new Promise((resolve) => {
process.nextTick(() => {
diff --git a/lib/util.js b/lib/util.js
index b1e2175..dd94ba2 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -502,7 +502,7 @@ function countLines(lines, startingWith) {
return uniqueLines.length;
}
-function sanitizeShellString(str) {
+function sanitizeShellString(str, strict = false) {
const s = str || '';
let result = '';
for (let i = 0; i <= 2000; i++) {
@@ -527,7 +527,10 @@ function sanitizeShellString(str) {
s[i] === '\n' ||
s[i] === '\'' ||
s[i] === '`' ||
- s[i] === '"')) {
+ s[i] === '"' ||
+ strict && s[i] === ' ' ||
+ strict && s[i] == '{' ||
+ strict && s[i] == ')')) {
result = result + s[i];
}
}