-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Security] Remote command execution #12
Comments
With the code you can edit everything or you can run bash scripts directly. But I agree, this must be sanitised. I'll fix it. |
Awesome. Someone could disable functionalities, but that api isn't intended to provide rce. Thanks @petersirka |
@Will-create can you look at this again? #20 |
if that field should accept only IPs, why not using a specific regex only for IPs? |
The domain name and IP address can be pinged. It is therefore impossible to have an IP validator alone. |
Got it. In general an allow-list is preferred over a block-list of entries. In this case the regex must check that only the allowed characters are entered: alphabetic characters (A-Z), numeric characters (0-9), the minus sign (-), and the period (.) |
Using the API
/api/common/ping
it's possible to achieve remote command execution on the host machine. This leads to complete control over the machine hosting the server.To reproduce the vulnerability:
node index.js
HTTP request:
This is the vulnerable code:
Here the problem is the fact that the server doesn't sanitize correctly the input checking that the host provided is a legitimate one, allowing also characters like
;
,|
or&
.The text was updated successfully, but these errors were encountered: