Skip to main content

CVE-2026-87975: CWE-639: Authorization Bypass Through User-Controlled Key in djangoproject Django

0
Medium
VulnerabilityCVE-2026-87975cvecve-2026-87975cwe-639
Published: 10/06/2026 (10/06/2026, 13:35:59 UTC)
Source: CVE Database V5
Vendor/Project: djangoproject
Product: Django

Description

CVE-2026-87975 is an authorization bypass vulnerability in Django affecting versions 6.1 before 6.1.2, 6.0 before 6.0.9, and 5.2 before 5.2.18. The issue arises in django.forms.models.BaseModelFormSet.save_existing_objects(), which incorrectly trusts the presence of a primary key on a submitted form's instance as proof that the instance belongs to the formset's limiting queryset. This flaw allows an authenticated user with permission to submit such a formset to delete objects outside the intended queryset by submitting forged management-form data. Models using the default AutoField primary key are not affected. The vulnerability has a medium severity with a CVSS score of 4.3.

CVSS v3.1

Score 4.3medium

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Affected software

djangoproject

Django

Affected versions
>=6.1 <6.1.2>=6.0 <6.0.9>=5.2 <5.2.18
django
pkg:pypi/django
Affected versions
>=6.1 <6.1.2>=6.0 <6.0.9>=5.2 <5.2.18

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/06/2026, 14:04:38 UTC

Technical Analysis

The vulnerability in Django's BaseModelFormSet.save_existing_objects() method occurs because it uses the presence of a primary key on a submitted form instance as evidence that the instance belongs to the formset's limiting queryset. When the model's primary key is a field accepted by the form (such as OneToOneField, parent link, natural key, or UUID primary key), an attacker can forge management-form data to mark objects outside the queryset for deletion. This allows an authenticated user with permission to submit the formset to delete rows they do not have explicit permission to delete. Models using the default AutoField primary key are not vulnerable. Affected versions are Django 6.1 prior to 6.1.2, 6.0 prior to 6.0.9, and 5.2 prior to 5.2.18.

Potential Impact

An authenticated user permitted to submit the affected formset can delete database rows outside the intended queryset without having permission on those objects. This results in an authorization bypass leading to unintended data deletion. There is no impact on confidentiality or availability, and no known exploitation in the wild has been reported.

Mitigation Recommendations

A fix is available in Django versions 6.1.2, 6.0.9, and 5.2.18. Users should upgrade to these or later versions to remediate the vulnerability. No other mitigation is indicated by the vendor advisory.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
DSF
Date Reserved
2026-09-09T18:18:45.075Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6ac4fc562cdf04f656b4d698

Added to database: 10/06/2026, 13:49:10 UTC

Last enriched: 10/06/2026, 14:04:38 UTC

Last updated: 10/06/2026, 19:48:07 UTC

Views: 8

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses