Serverinfo endpoints are not bruteforce protected nor are tokens properly generated
The serverinfo app's API endpoints accept a custom token but lack brute-force protection, and the token is generated client-side in a way that is likely weak. An attacker could repeatedly guess tokens to gain access to the endpoints.
- Disclosed after 20 days
The serverinfo app allows accessing the endpoints also via a custom token.
The token is set/generated via https://github.com/nextcloud/serverinfo/blob/9ae9dde028a684e53a1b37c9ba8e964ffe42a97f/templates/settings-admin.php#L341
Impact
There is no bruteforce protection on this endpoint in general. So a attacker can just fire off request. Combine this with that they have to generate a token on their own (which is usually a lot weaker) and in a lot of cases obtaining acccess should not be horribly hard.
I'd recommend
- Add bruteforce protection to the endpoint
- Have a button in the UI to generate a proper long random string
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the endpoint lacks rate limiting, and the token is generated in a way that is usually weaker.
Impact
An attacker could brute-force the token and in many cases obtain access to the serverinfo endpoints.
What the attacker needed
Access to the serverinfo endpoint
The fix
The reporter recommends adding brute-force protection and a UI button to generate a long random token.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Some web apps let you access data by including a secret token in the request. If the app does not limit how many guesses someone can make, an attacker can try many tokens quickly until one works. Here the token is also created in a way that may make it easier to guess.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.