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

Potential DOS-Vulnerability in the SPP calculation #9

Closed
MWFIAE opened this issue Sep 4, 2018 · 1 comment
Closed

Potential DOS-Vulnerability in the SPP calculation #9

MWFIAE opened this issue Sep 4, 2018 · 1 comment

Comments

@MWFIAE
Copy link

MWFIAE commented Sep 4, 2018

Expected behavior

The job that updates the SPP (Steemplus Points) should only run every hour, as mentioned in the coding.

Only authorized persons should be able to start resource-intensive jobs on the steemplus api server. Such a functionality is never to be exposed via an api.

Actual behavior

Every user is able to call the mentioned api endpoint to start the job manually. A malicious user could use this to overload the steemplus api server, resulting in a DOS (Denial-of-Service) attack.

How to reproduce

It is easily possible to reproduce the bug by just calling the specific endpoint for the api:
/job/update-steemplus-points

Solution

A solution could be to secure the api endpoint via a private key saved in the config. With this only authorized users can call the function.
Another solution would be to not expose this function to the api at all and only call it internally via a cronjob or similar.

I decided to go with solution number one and started a pull-request for it:
Pull-Request

Recording Of The Bug

Before executing the job:

Executing the job:

After executing the job:

As we see my user-information was created and my points where updated without waiting for an hour.

@stoodkev
Copy link
Owner

stoodkev commented Sep 4, 2018

Thanks! Solved in #7

@stoodkev stoodkev closed this as completed Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants