-
Notifications
You must be signed in to change notification settings - Fork 120
fix/IDOR vulnerability #63
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
base: app-attack-fixes
Are you sure you want to change the base?
fix/IDOR vulnerability #63
Conversation
…ule to implement RBAC on email, firstname, lastmame, username
…ssing full staff details
… response serialization.
…ing in UnitEntity for RBAC enforcement.
…ifferent api entities
|
Hi @atharv02-git, I have tested your fix for the IDOR vulnerability and can confirm that it has been resolved. The sensitive staff information (main_convenor_id, tutor_id, email, full_name) is no longer accessible to non-privileged users such as students. The access control now correctly restricts this data based on user role, and the fix appears to be working as intended. Well done on implementing a clear and maintainable fix for this issue. Best regards, |
|
Hi @atharv02-git, This is a well-executed fix that resolves the IDOR vulnerability with as few changes to the codebase as possible.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, following a thorough review of the documentation, I confirmed the vulnerability and verified that the fix effectively mitigates this vulnerability. Reconfirming with Postman, the backend now restricts access based on roles. I initially followed your prior documentation and ended up implementing a fix that broke communication with the front end, leading me to believe that was still the issue. Following our conversation, I have pulled the most recent commits as is and confirmed that isn't the case. Thank you for the correction and the opportunity to review your work.
aNebula
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please open an upstream PR against 9.x branch on doubtfire-lms/doubtfire-api. Remember to include a description, and may be even a link to the documentation.
Hi @aNebula, |
Description
main_convenor_id, tutor_id, email, full_name) through the/api/units/:idendpoint.Root Cause
Entities::UnitEntityclass.Fixes # (issue)
Fix Summary
UnitEntityclass is responsible for deciding what fields of the Unit model are exposed. Fields such as:staff, :main_convenor_id, and :overseer_image_idwere conditionally exposed but lacked proper role validation.Validation:
Before
Postmanresponse tells that, students were able to access insecure data by hitting the endpoint.After:
The After Screenshot tells that, after implementing Role based filtering student's are unable to see staff data anymore.

However I would like to point out that, the code changes which I made earlier to implement Role Based filtering, the logic was breaking the actual functionality of the OnTrack, so after this change, the staff are able to access the privileged data as before but students are unable to.
Postman API response when logged in by Convenor:

Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Checklist: