Skip to content

Commit

Permalink
Merge branch 'master' into encrypt-jwt-value
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycarambat authored Aug 14, 2024
2 parents b988fc1 + b541623 commit d92fb78
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion collector/utils/url/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/** ATTN: SECURITY RESEARCHERS
* To Security researchers about to submit an SSRF report CVE - please don't.
* We are aware that the code below is does not defend against any of the thousands of ways
* you can map a hostname to another IP. The code below does not have intention of blocking this
* and is simply to prevent the user from accidentally putting in non-valid websites, which is all this protects
* since _all urls must be submitted by the user anyway_ and cannot be done with authentication and manager or admin roles.
* If an attacker has those roles then the system is already vulnerable and this is not a primary concern.
*
* We have gotten this report may times, marked them as duplicate or information and continue to get them. We communicate
* already that deployment (and security) of an instance is on the deployer and system admin deploying it. This would include
* isolation, firewalls, and the general security of the instance.
*/

const VALID_PROTOCOLS = ["https:", "http:"];
const INVALID_OCTETS = [192, 172, 10, 127];

Expand All @@ -19,7 +32,7 @@ function validURL(url) {
if (!VALID_PROTOCOLS.includes(destination.protocol)) return false;
if (isInvalidIp(destination)) return false;
return true;
} catch {}
} catch { }
return false;
}

Expand Down

0 comments on commit d92fb78

Please sign in to comment.