Fix DojoGroupSerializer to handle empty permissions list#13447
Merged
Fix DojoGroupSerializer to handle empty permissions list#13447
Conversation
|
This pull request introduces a change that allows a user with standard Permissions.Group_Edit on a given group to clear all group permissions by submitting an empty auth_group.permissions list, effectively enabling denial-of-service for group members because there is no elevated/explicit permission check for this sensitive action. It recommends adding a stricter authorization check (or separate permission) for clearing all permissions to prevent misuse.
Authorization flaw allowing group permission clearing in
|
| Vulnerability | Authorization flaw allowing group permission clearing |
|---|---|
| Description | The patch introduces a mechanism to clear all group permissions if an empty list is provided in the auth_group.permissions field. The authorization logic for updating a group (via DojoGroupViewSet and UserHasDojoGroupPermission) only checks for Permissions.Group_Edit. This means any user with Permissions.Group_Edit on a specific group can send a request to clear all permissions for that group, leading to a denial of service for its members. There is no specific, elevated permission check for the sensitive action of clearing all group permissions. |
django-DefectDojo/dojo/api_v2/serializers.py
Lines 731 to 732 in 29a44ab
All finding details can be found in the DryRun Security Dashboard.
blakeaowens
approved these changes
Oct 17, 2025
valentijnscholten
approved these changes
Oct 17, 2025
Jino-T
approved these changes
Oct 17, 2025
Maffooch
added a commit
to valentijnscholten/django-DefectDojo
that referenced
this pull request
Feb 16, 2026
…13447) * fix(serializers): Update DojoGroupSerializer to handle empty permissions list * Accommodate the UserSerializer as well
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the DojoGroupSerializer to clear permissions when an empty list is provided, ensuring proper handling of permission updates.