validator: company #623
validator: company #623
Nullify Code
Severity Threshold: 🔵 MEDIUM
2 Potential vulnerability sources found within this repo
🔴 CRITICAL |
🟡 HIGH |
🔵 MEDIUM |
⚪ LOW |
---|---|---|---|
0 | 1 | 1 | 0 |
ID: 01J9CX895ER28XS6DP8A7VY6AY
Language: TypeScript
Severity: 🟡 HIGH
CWE-918
Rules lgpl javascript ssrf rule node ssrf
This application allows user-controlled URLs to be passed directly to HTTP client libraries. This can result in Server-Side Request Forgery (SSRF). SSRF refers to an attack where the attacker can abuse functionality on the server to force it to make requests to other internal systems within your infrastructure that are not directly exposed to the internet. This allows the attacker to access internal resources they do not have direct access to.
Some risks of SSRF are:
- Access and manipulation of internal databases, APIs, or administrative panels - Ability to scan internal network architecture and services - Can be used to pivot attacks into the internal network - Circumvent network segregation and firewall rules
To avoid this, try using hardcoded HTTP request calls or a whitelisting object to check whether the user input is trying to access allowed resources or not.
Here is an example:var whitelist = [ "https://example.com", "https://example.com/sample" ] app.get('/ssrf/node-ssrf/axios/safe/3', function (req, res) { if(whitelist.includes(req.query.url)){ axios.get(url, {}) .then(function (response) { console.log(response); }) .catch(function (response) { console.log(response); }) } });
For more information on SSRF see OWASP: https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html
flatfile-plugins/validate/company/src/validate.company.utils.ts
Lines 43 to 48 in 4446375
ID: 01J9CX895ER28XS6DP8E5YACKR
Language: TypeScript
Severity: 🔵 MEDIUM
CWE-209
Generic error disclosure
Error messages with stack traces may expose sensitive information about the application.
flatfile-plugins/validate/company/src/validate.company.utils.ts
Lines 62 to 67 in 4446375