CVE-2026-87975
published medium CVSS 4.0 · 5.3Privilege abuse in model formsets with editable primary keys
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| djangoproject | — | djangoDjango · 6.1 to < 6.1.2 (affected · python) · 6.1.2 (unaffected · python) · 6.0 to < 6.0.9 (affected · python) · 6.0.9 (unaffected · python) · 5.2 to < 5.2.18 (affected · python) · 5.2.18 (unaffected · python) · Other versions: unaffected | Version-specific | Not stated | DSF |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Alpine Linux | edge | py3-django | Fixed | 5.2.18-r0 | Package fix record |
| Debian | bookworm | python-django | Advisory build | 3:3.2.25-0+deb12u6 | DLA-4843-1 |
| SUSE / openSUSE | SLE-15-SP7 | python311-Djangonoarch | Advisory build | 4.2.11-150600.3.68.1 | SUSE-SU-2026:4626-1 |
| Alpine Linux | v3.24 | py3-django | Fixed | 5.2.18-r0 | Package fix record |
| SUSE / openSUSE | openSUSE-Leap-16.0 | python313-Djangonoarch | Advisory build | 5.2.4-bp160.12.1 | OPENSUSE-SU-2026:22196-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Djangoaarch64 | Advisory build | 6.1.2-1.1 | OPENSUSE-SU-2026:12103-1 |
Show 23 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Djangoppc64le | Advisory build | 6.1.2-1.1 | OPENSUSE-SU-2026:12103-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Djangos390x | Advisory build | 6.1.2-1.1 | OPENSUSE-SU-2026:12103-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Djangox86_64 | Advisory build | 6.1.2-1.1 | OPENSUSE-SU-2026:12103-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django4aarch64 | Advisory build | 4.2.30-6.1 | OPENSUSE-SU-2026:12086-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django4ppc64le | Advisory build | 4.2.30-6.1 | OPENSUSE-SU-2026:12086-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django4s390x | Advisory build | 4.2.30-6.1 | OPENSUSE-SU-2026:12086-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django4x86_64 | Advisory build | 4.2.30-6.1 | OPENSUSE-SU-2026:12086-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django5aarch64 | Advisory build | 5.2.18-1.1 | OPENSUSE-SU-2026:12095-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django5ppc64le | Advisory build | 5.2.18-1.1 | OPENSUSE-SU-2026:12095-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django5s390x | Advisory build | 5.2.18-1.1 | OPENSUSE-SU-2026:12095-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django5x86_64 | Advisory build | 5.2.18-1.1 | OPENSUSE-SU-2026:12095-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Djangoaarch64 | Advisory build | 6.1.2-1.1 | OPENSUSE-SU-2026:12103-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Djangoppc64le | Advisory build | 6.1.2-1.1 | OPENSUSE-SU-2026:12103-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Djangos390x | Advisory build | 6.1.2-1.1 | OPENSUSE-SU-2026:12103-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Djangox86_64 | Advisory build | 6.1.2-1.1 | OPENSUSE-SU-2026:12103-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Django4aarch64 | Advisory build | 4.2.30-6.1 | OPENSUSE-SU-2026:12086-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Django4ppc64le | Advisory build | 4.2.30-6.1 | OPENSUSE-SU-2026:12086-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Django4s390x | Advisory build | 4.2.30-6.1 | OPENSUSE-SU-2026:12086-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Django4x86_64 | Advisory build | 4.2.30-6.1 | OPENSUSE-SU-2026:12086-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Django5aarch64 | Advisory build | 5.2.18-1.1 | OPENSUSE-SU-2026:12095-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Django5ppc64le | Advisory build | 5.2.18-1.1 | OPENSUSE-SU-2026:12095-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Django5s390x | Advisory build | 5.2.18-1.1 | OPENSUSE-SU-2026:12095-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Django5x86_64 | Advisory build | 5.2.18-1.1 | OPENSUSE-SU-2026:12095-1 |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- DSF · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 4.3 | medium | DSF · cna | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| djangoproject | Django | 6.1 to < 6.1.2 (affected · python)6.1.2 (unaffected · python)6.0 to < 6.0.9 (affected · python)6.0.9 (unaffected · python)5.2 to < 5.2.18 (affected · python)5.2.18 (unaffected · python)Default: unaffected | DSF · cna |
Weaknesses
1- CWE-639 CWE-639: Authorization Bypass Through User-Controlled Key
References
7- Django security archive https://docs.djangoproject.com/en/dev/releases/security/
- https://github.com/django/django/commit/83cbd21be57483e6b3eb6e4688a561c841aff75e
- https://github.com/django/django/commit/b83ab92bc5474558b083a840ea4628b3261b2cfe
- https://github.com/django/django/commit/cce6c57ed30ea83725f9d6abb2fe5ee932bab107
- https://github.com/django/django/commit/ff27883ca055aa9ab23015b50674a5b10dfe5a41
- Django releases announcements https://groups.google.com/g/django-announce
- Django security releases issued: 6.1.2, 6.0.9, and 5.2.18 https://www.djangoproject.com/weblog/2026/oct/06/security-releases/
Provider assertions
2DSF · cna
Privilege abuse in model formsets with editable primary keys
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- d9191e17e851281271806cef635f048027b5734289361c855a68d1d17726ce32
- Ingested
- 06 Oct 2026, 14:00:11 UTC
- Source record
- Official CVE record