CVE-2026–16764 // Privilege Escalation on DefectDojo ≤ 2.59.0
The DefectDojo API v2 user serializer guarded the is_superuser field but not is_staff, and is_staff was writable. A non-superuser holding only the auth.change_user permission could PATCH their own user record to set is_staff true, reach the default-enabled Django admin, and then grant themselves full superuser rights.
Published on makyotox.medium.com
In this article, I want to highlight how AI is transforming vulnerability management operations, with a particular focus on exploit generation.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The user serializer's validation only blocked changes to is_superuser and left is_staff writable without a permission check.
Impact
A non-superuser with only the change-user permission could escalate to full superuser, but only because the Django admin site was left enabled by default.
What the attacker needed
A low-privilege account; auth.change_user permission; an API token for that account; Django admin left enabled
The fix
The issue was fixed by adding an is_staff guard and locking down the admin site, and users should upgrade to 2.58.3, 2.58.4, or 3.0.0 or later.
How it was found
- Obtain a low-privilege account that has the auth.change_user permission and an API token.
- Resolve your own user id through the API.
- Send a PATCH to the user endpoint setting is_staff to true.
- Confirm the response returns 200 with is_staff true.
- Log in to the Django admin and set is_superuser to gain full superuser rights.
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 write-up has not been written yet. The Original tab links to the source.
DefectDojo is a tool for tracking security findings, and it has user accounts with different permission levels. A normal user who was allowed to edit user records could quietly mark themselves as 'staff', which then let them into the built-in admin area and from there make themselves a full administrator. The mistake was that the code checked one powerful flag but forgot to check the other one.
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.