Skip to main content

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. (CVE-2026-87975)

0
Medium
Published: 10/06/2026 (10/06/2026, 15:32:01 UTC)
Source: GCVE Database

Description

A vulnerability in Django versions 6.1 before 6.1.2, 6.0 before 6.0.9, and 5.2 before 5.2.18 allows an authenticated user with permission to submit a formset to delete database rows outside the formset's limiting queryset. This occurs because the save_existing_objects() method incorrectly trusts the presence of a primary key in submitted form data as proof that the object belongs to the queryset, enabling deletion of unauthorized objects when certain primary key types are used. Models with default AutoField primary keys are not affected.

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

django
pkg:pypi/django

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, 17:04:10 UTC

Technical Analysis

The vulnerability (CVE-2026-87975) affects Django's form handling in versions prior to 6.1.2, 6.0.9, and 5.2.18. The method django.forms.models.BaseModelFormSet.save_existing_objects() uses the presence of a primary key on a submitted form instance to assume the instance belongs to the formset's limiting queryset. However, if the primary key is a field accepted by the form (e.g., OneToOneField, parent link, natural key, or UUID), an attacker with permission to submit the formset can craft management-form data to mark objects outside the queryset for deletion, bypassing object-level permissions. This issue does not affect models using the default AutoField primary key. Earlier unsupported Django versions may also be affected but were not evaluated.

Potential Impact

An authenticated user with permission to submit a formset can delete database rows outside the intended queryset without having explicit permission on those objects. This could lead to unauthorized data deletion. There is no impact on confidentiality or availability, and models using the default AutoField primary key are not vulnerable.

Mitigation Recommendations

Official fixes are 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. Since this is a code-level issue in Django, no other mitigations are specified. Patch status is confirmed by the version numbers indicating fixed releases.

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

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-x869-hccf-fv7r
Osv Schema Version
1.4.0
Aliases
["CVE-2026-87975"]
Database Specific Severity
MODERATE
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6ac5236f2cdf04f656c4bf10

Added to database: 10/06/2026, 16:35:59 UTC

Last enriched: 10/06/2026, 17:04:10 UTC

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

Views: 5

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