Be aware to not use inetLatency(), inetChecksite(), services(), processLoad() with arbitrary untrusted user input! We are doing a lot of input sanitation for those functions in this package but we cannot handle all cases!
Be aware to not use inetLatency(), inetChecksite(), services(), processLoad() with arbitrary untrusted user input! We are doing a lot of input sanitation for those functions in this package but we cannot handle all cases!
+
Command Injection Vulnerability
Affected versions:
< 4.34.17
diff --git a/lib/internet.js b/lib/internet.js
index 23e6d6f..cc996e1 100644
--- a/lib/internet.js
+++ b/lib/internet.js
@@ -58,7 +58,7 @@ function inetChecksite(url, callback) {
try {
if (urlSanitized && !util.isPrototypePolluted()) {
urlSanitized.__proto__.startsWith = util.stringStartWith;
- if (urlSanitized.startsWith('file:')) {
+ if (urlSanitized.startsWith('file:') || urlSanitized.startsWith('gopher:') || urlSanitized.startsWith('telnet:') || urlSanitized.startsWith('mailto:') || urlSanitized.startsWith('news:') || urlSanitized.startsWith('nntp:')) {
if (callback) { callback(result); }
return resolve(result);
}
@@ -153,7 +153,7 @@ function inetLatency(host, callback) {
}
}
hostSanitized.__proto__.startsWith = util.stringStartWith;
- if (hostSanitized.startsWith('file:')) {
+ if (hostSanitized.startsWith('file:') || hostSanitized.startsWith('gopher:') || hostSanitized.startsWith('telnet:') || hostSanitized.startsWith('mailto:') || hostSanitized.startsWith('news:') || hostSanitized.startsWith('nntp:')) {
if (callback) { callback(null); }
return resolve(null);
}