Skip to content
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

Minimum check interval is only enforced on the frontend #625

Closed
lrstanley opened this issue Oct 9, 2021 · 2 comments
Closed

Minimum check interval is only enforced on the frontend #625

lrstanley opened this issue Oct 9, 2021 · 2 comments
Labels
feature-request Request for new features to be added

Comments

@lrstanley
Copy link

lrstanley commented Oct 9, 2021

Describe the bug

A user can submit an http request with an extremely low check interval (say... 0.01s), as the limit is only enforced on the frontend side of the service. This can lead to a potential denial-of-service attack by overloading the service, and potentially causing service disruption to the target monitored website.

To Reproduce

Steps to reproduce the behavior: Either submit an http request with the lower value, or use Chrome debugging tools to remove the min="<int>" and type="number" attributes, which will allow you to still lower the value via the UI.

Was able to replicate this on: demo.uptime.kuma.pet.

Expected behavior

The frontend and backend should both enforce this behavior, to prevent unwanted or malicious behavior.

@lrstanley lrstanley added the bug Something isn't working label Oct 9, 2021
@louislam louislam added feature-request Request for new features to be added and removed bug Something isn't working labels Oct 9, 2021
@louislam
Copy link
Owner

louislam commented Oct 9, 2021

Thank you for your report.

Yes, the input validations are frontend only currently. In the current stage, it should not be a big problem, as there is only one user account only. And that's one of reasons why multiple users features (#128) is not implemented yet.

However, it did hurt the demo site though, I just fixed it quickly: 5c89562

Would be appreciated if you could send the security issue to the email first.
https://github.com/louislam/uptime-kuma/security/policy

@CommanderStorm
Copy link
Collaborator

@lrstanley I think this issue is resolved:
image

Which is checked on the server here:

/** Make sure monitor interval is between bounds */
validate() {
if (this.interval > MAX_INTERVAL_SECOND) {
throw new Error(`Interval cannot be more than ${MAX_INTERVAL_SECOND} seconds`);
}
if (this.interval < MIN_INTERVAL_SECOND) {
throw new Error(`Interval cannot be less than ${MIN_INTERVAL_SECOND} seconds`);
}
}

=> Could you close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features to be added
Projects
None yet
Development

No branches or pull requests

3 participants