Closed (fixed)
Project:
User Relationships
Version:
5.x-2.8
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
7 May 2009 at 19:10 UTC
Updated:
22 May 2009 at 02:30 UTC
Any user can delete another user's relationships if they know (or guess) the rid. The callback for removing relationships doesn't check to make sure the user is authorized.
Here are steps to reproduce. Let's call our friendly users Alice and Bob, and our attacker Eve.
https://example.com/site/user/2/relationships/remove/128?destination=relationships; in this example, the 2 is Bob's UID, and the 128 is the rid
I have not tested it, but I suspect a similar problem exists when disapproving relationships, and cancelling pending relationships.
Is there some configuration option I'm missing to prevent this? Otherwise I'll see if I can put together a patch.
Comments
Comment #1
alex.k commentedComment #2
scottgifford commentedThe same issue exists with approving relationships. That's pretty severe actually; Eve can request a relationship with Alice, then approve it herself by going to the approve url.
Comment #3
alex.k commentedFixed, and created a 5.x-2.9 release: http://drupal.org/node/456782
You should not have created this issue without contacting me first. While it's not a security vulnerability, i would have wanted more time to look at it and put out a fix.
Comment #4
scottgifford commentedYeah, sorry, after posting it I realized I should have handled it as a security issue, but I didn't see a way to change it after the fact. Thanks for the quick fix!
Comment #5
scottgifford commentedWith the fix in 2.9, in step 6 above the user still gets a page asking them if they want to delete the relationship, although when they press the button it won't work. Probably it would be better to show the error when they first visit the page.
Comment #6
gregglesThis was handled quite quickly, which is great, but you can always contact the security team and we can unpublish the node http://drupal.org/security-team#report-issue