# CVE-2024-32882: Permission check bypass when editing a model with per-field restrictions in wagtail

> Authenticated users with model edit rights can bypass field-level permission checks to modify restricted fields in Wagtail CMS settings or model viewsets.

- **Severity:** Low 2.7 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 May 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-w2v8-php4-p8hc, PYSEC-2026-2031

## What is CVE-2024-32882?

CVE-2024-32882 is a low-severity missing authorization vulnerability in wagtail, published on 2 May 2024. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

Wagtail is an open source content management system built on Django. In affected versions if a model has been made available for editing through the `wagtail.contrib.settings` module or `ModelViewSet`, and the `permission` argument on `FieldPanel` has been used to further restrict access to one or more fields of the model, a user with edit permission over the model but not the specific field can craft an HTTP POST request that bypasses the permission check on the individual field, allowing them to update its value. This vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin, or by a user who has not been granted edit access to the model in question. The editing interfaces for pages and snippets are also unaffected. Patched versions have been released as Wagtail 6.0.3 and 6.1. Wagtail releases prior to 6.0 are unaffected. Users are advised to upgrade. Site owners who are unable to upgrade to a patched version can avoid the vulnerability as follows: 1.For models registered through `ModelViewSet`, register the model as a snippet instead; 2. For settings models, place the restricted fields in a separate settings model, and configure permission at the model level.

Weakness: CWE-281 (Improper Preservation of Permissions), CWE-280 (Improper Handling of Insufficient Permissions or Privileges)

## Which versions are affected by CVE-2024-32882?

3 open source packages ship an affected version, including wagtail.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `wagtail` | PyPI | From 6.0.0 | 6.0.3 |
| `wagtail` | PyPI | From 6.0.0 | 6.0.3 |
| `wagtail` | PyPI | From 6.0.0 | 6.0.3 |

## How do I fix CVE-2024-32882?

Upgrade wagtail to 6.0.3 or later.

## Is CVE-2024-32882 being exploited?

There is no known exploitation of CVE-2024-32882 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-32882 and fix it if it is affected.

What it is: CVE-2024-32882 is a low-severity missing authorization vulnerability in wagtail, published on 2 May 2024. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-32882 in the wild and no public exploit code.

Affected packages and fixed versions:
- wagtail (PyPI): affected from 6.0.0; fixed in 6.0.3
- wagtail (PyPI): affected from 6.0.0; fixed in 6.0.3
- wagtail (PyPI): affected from 6.0.0; fixed in 6.0.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-32882/ (Markdown: https://insights.sbomify.com/CVE-2024-32882/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-32882
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-32882
- OSV: https://osv.dev/vulnerability/CVE-2024-32882

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-32882/
Summaries are generated and may contain mistakes; the official description above is the record.
