Upload of Avatars for other Users
An unprivileged authenticated user could change another user's avatar by calling the ufsImportURL API method with a different userId. This allowed attackers to upload avatar pictures on behalf of any other user.
- Triaged in 10 days
- Fixed in 5 months
- Disclosed after 5.5 years
Unprivileged users were found being able to upload Avatar pictures under the behalf of other users.
Attackers authenticated to the API trigger the ufsImportURL method with a different userId than their own, so that the other users avatar is changed.
The effect of an exploit depends on the storage backend, but the default one coming with a development release, GridFS, is affected.
Releases Affected:
Steps To Reproduce (from initial installation to vulnerability):
(Add details for how we can reproduce the issue)
- Authenticate to the API
- Invoke
ufsImportURLmethod pointing to other user - Clear browser caches and reload page
Supporting Material/References:
Payload
["{\"msg\":\"method\",\"method\":\"ufsImportURL\",\"params\":[\"https://radicallyopensecurity.com/images/ros-logo.gif\",{\"name\": \"ros.jpg\", \"extension\": \"jpg\", \"type\": \"text/plain\", \"userId\": \"<USER_ID>\"},\"Avatars\"],\"id\":\"15\"}"]
Suggested mitigation
- Properly authenticate Avatar uploads
Impact
Any authenticated user can upload avatar pictures for any other user.
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
The ufsImportURL method did not verify that the userId parameter matched the authenticated caller, allowing avatar uploads for arbitrary users.
Impact
Any authenticated user could upload avatar pictures for any other user; the effect depends on the storage backend, with the default GridFS backend affected.
What the attacker needed
An authenticated API session
The fix
Avatar uploads should be properly authenticated so that a user can only change their own avatar.
How it was found
- Authenticate to the API
- Invoke the ufsImportURL method pointing to another user
- Clear browser caches and reload the page
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.
The application lets users set their profile picture by giving it a web address to fetch. The server did not check that the user ID in that request belonged to the person making it, so anyone logged in could change someone else's picture. This is a missing permission check.
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.