Authorization bypass in Django model formsets lets users delete rows
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- Partial Red Hat: 10 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-639.
Summary
Django's model formset save logic in django.forms.models trusts a submitted primary key as proof that an object belongs to the formset's queryset. When the primary key is a form field, such as a OneToOneField, parent link, UUID or natural key, an authenticated user permitted to submit the formset can delete objects outside that queryset without permission on them. This is CWE-639, an authorization bypass through a user-controlled key, affecting Django from 6.1 before 6.1.2, from 6.0 before 6.0.9, and from 5.2 before 5.2.18. Models with the default AutoField primary key are not affected.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
Description from the CNA
An issue was discovered in Django 6.1 before 6.1.2, 6.0 before 6.0.9, and 5.2 before 5.2.18. `django.forms.models.BaseModelFormSet.save_existing_objects()` used the presence of a primary key on a submitted form's instance as evidence that the instance belonged to the formset's limiting queryset. An object outside that queryset is represented by a newly constructed instance whose primary key can still be populated from submitted data when the model's primary key is a field accepted by the form, such as a `OneToOneField` or parent link used as the primary key of an inline formset's model, or a natural or UUID primary key included in the form's fields. This allows an authenticated user permitted to submit such a formset to delete rows outside the limiting queryset, without any permission on the targeted object, via forged management-form data marking an out-of-queryset object for deletion. Models using the default AutoField primary key are not affected. Earlier, unsupported Django series (such as 5.1.x, 5.0.x, and 4.2.x) were not evaluated and may also be affected. Django would like to thank Seonggwon Yoon for reporting this issue.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| djangoproject | Django | 6.1 to before 6.1.2; 6.0 to before 6.0.9; 5.2 to before 5.2.18 | 6.1.2, 6.0.9, 5.2.18 | Patch available | CNA |
- Django Vendordjangoproject Affected 6.1 to before 6.1.2; 6.0 to before 6.0.9; 5.2 to before 5.2.18 Fixed in 6.1.2, 6.0.9, 5.2.18 Patch available CNA
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* | — | — | djangoproject |
- cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* Versions — — ·djangoproject
Remediation
Upgrade Django to 6.1.2, 6.0.9 or 5.2.18. The sources list no fixed version for Red Hat Ansible Automation Platform 2, Red Hat Discovery 2, Red Hat OpenStack Platform 18.0, Red Hat Satellite 6, Red Hat Update Infrastructure 5 and Self-service automation portal 2, with plan none available. The sources list no fixed version for Red Hat OpenStack Platform 13 (Queens), Red Hat OpenStack Platform 16.2, Red Hat OpenStack Platform 17.1 and Red Hat Update Infrastructure 4 for Cloud Providers, with no fix planned.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
- Fix · CNA Django (djangoproject) Fixed in 6.1.2, 6.0.9, 5.2.18
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Advisory ·
djangoproject Django — Django security releases issued: 6.1.2, 6.0.9, and 5.2.18
4 records Highest priority Priority LOW 4 LOW
Other records, highest priority first
- TI-2026-68438 Quadratic parsing in Django HTTP headers allows denial of servicePriority LOW 37
- TI-2026-68435 Memory exhaustion in Django get_supported_language_variant()Priority LOW 37
- TI-2026-68440 Server-side request forgery in Django spatial lookup bytes valuesPriority LOW 36
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat Discovery 2 | Affected | No fix yet: Fix deferred |
| Red Hat OpenStack Platform 13 (Queens) | Affected | No fix planned: Out of support scope |
| Red Hat OpenStack Platform 16.2 | Affected | No fix planned: Out of support scope |
| Red Hat OpenStack Platform 17.1 | Affected | No fix planned: Out of support scope |
| Red Hat OpenStack Platform 18.0 | Affected | No fix yet: Fix deferred |
| Red Hat Satellite 6 | Affected | No fix yet: Fix deferred |
| Red Hat Update Infrastructure 4 for Cloud Providers | Affected | No fix planned: Out of support scope |
| Red Hat Update Infrastructure 5 | Affected | No fix yet: Fix deferred |
| Self-service automation portal 2 | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-06 Threatist record created from CVE-2026-87975
- 2026-10-06 Alias added: GHSA-x869-hccf-fv7r
- 2026-10-07 Affected versions changed · Red Hat
- 2026-10-07 CVSS score added · Red Hat
- 2026-10-07 Affected versions changed · Red Hat
References
Patch 4
- https://github.com/django/django/commit/83cbd21be57483e6b3eb6e4688a561c841aff75e
- https://github.com/django/django/commit/cce6c57ed30ea83725f9d6abb2fe5ee932bab107
- https://github.com/django/django/commit/b83ab92bc5474558b083a840ea4628b3261b2cfe
- https://github.com/django/django/commit/ff27883ca055aa9ab23015b50674a5b10dfe5a41
More djangoproject vulnerabilities
- TI-2022-15177 An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. CVSS 3.1CRITICAL 9.8
- TI-2020-05994 Django 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3 allows SQL Injection… CVSS 3.1CRITICAL 9.8
- TI-2023-10198 An issue was discovered in the Multipart Request Parser in Django 3.2 before 3.2.18, 4.0… CVSS 3.1HIGH 7.5
- TI-2019-14306 Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. CVSS 3.1CRITICAL 9.8
- TI-2019-10595 An issue was discovered in Django 1.11.x before 1.11.23, 2.1.x before 2.1.11, and 2.2.x… CVSS 3.0CRITICAL 9.8
- TI-2021-14006 Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection… CVSS 3.1CRITICAL 9.8
Sources
- CVE-2026-87975 · CVE Program
- CVE-2026-87975 · NVD
- FIRST EPSS
- GHSA-x869-hccf-fv7r · GitHub Advisory Database · CC BY 4.0
- CVE-2026-87975 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences