# CVE-2024-35228: Improper Handling of Insufficient Permissions in Wagtail

> Authenticated admin users can modify settings without proper permissions due to a missing check in Wagtail's settings module.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:H/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:** 30 May 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-xxfm-vmcf-g33f, PYSEC-2026-2032

## What is CVE-2024-35228?

CVE-2024-35228 is a medium-severity missing authorization vulnerability in wagtail, published on 30 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. Due to an improperly applied permission check in the `wagtail.contrib.settings` module, a user with access to the Wagtail admin and knowledge of the URL of the edit view for a settings model can access and update that setting, even when they have not been granted permission over the model. The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin. Patched versions have been released as Wagtail 6.0.5 and 6.1.2. 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 in `ModelViewSet` by registering the model as a snippet instead. No workaround is available for `wagtail.contrib.settings`.

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

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

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `wagtail` | PyPI | From 6.0.0 | 6.0.5, 6.1.2 |
| `wagtail` | PyPI | From 6.0.0 | 6.0.5 |
| `wagtail` | PyPI | From 6.0.0 | 6.0.5 |
| `wagtail` | PyPI | From 6.1.0 | 6.1.2 |
| `wagtail` | PyPI | From 6.1.0 | 6.1.2 |

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

Upgrade wagtail to a fixed version for your release line: 6.0.5 or 6.1.2.

## Is CVE-2024-35228 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2024-35228 is a medium-severity missing authorization vulnerability in wagtail, published on 30 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-35228 in the wild and no public exploit code.

Affected packages and fixed versions:
- wagtail (PyPI): affected from 6.0.0; fixed in 6.0.5, 6.1.2
- wagtail (PyPI): affected from 6.0.0; fixed in 6.0.5
- wagtail (PyPI): affected from 6.0.0; fixed in 6.0.5
- wagtail (PyPI): affected from 6.1.0; fixed in 6.1.2
- wagtail (PyPI): affected from 6.1.0; fixed in 6.1.2

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-35228/ (Markdown: https://insights.sbomify.com/CVE-2024-35228/index.md)
```

## Sources

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

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