Command Injection Vulnerability
+Affected versions:
+ < 5.6.3 and < 4.34.13
+ Date: 2021-03-14
+ CVE indentifier -
+
Impact
+We had an issue that there was a possibility to perform a potential command injection possibility by passing a manipulated string prototype as a parameter to the following functions. Affected commands: inetLatency(), inetChecksite(), services(), processLoad().
+ +Patch
+Problem was fixed with additional parameter checking. Please upgrade to version >= 5.6.3 (or >= 4.34.13 if you are using version 4).
+ +Workarround
+If you cannot upgrade, be sure to check or sanitize parameter strings that are passed to inetLatency(), inetChecksite(), services(), processLoad() (string only)
++
Insufficient File Scheme Validation
Affected versions:
< 5.3.2 and < 4.34.12
diff --git a/lib/util.js b/lib/util.js
index 24b3e6e..04e5a89 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -529,10 +529,11 @@ function sanitizeShellString(str, strict = false) {
s[i] === '\'' ||
s[i] === '`' ||
s[i] === '"' ||
- strict && s[i] === '@' ||
- strict && s[i] === ' ' ||
- strict && s[i] == '{' ||
- strict && s[i] == ')')) {
+ s[i].length > 1 ||
+ (strict && s[i] === '@') ||
+ (strict && s[i] === ' ') ||
+ (strict && s[i] == '{') ||
+ (strict && s[i] == ')'))) {
result = result + s[i];
}
}