Skip to content

Wagtail has permission check bypass when editing a model with per-field restrictions through `wagtail.contrib.settings` or `ModelViewSet`

Low severity GitHub Reviewed Published May 1, 2024 in wagtail/wagtail • Updated May 2, 2024

Package

pip wagtail (pip)

Affected versions

>= 6.0.0, < 6.0.3

Patched versions

6.0.3

Description

Impact

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.

The 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.

Patches

Patched versions have been released as Wagtail 6.0.3 and 6.1. Wagtail releases prior to 6.0 are unaffected.

Workarounds

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.

Acknowledgements

Many thanks to Ben Morse and Joshua Munn for reporting this issue.

For more information

If you have any questions or comments about this advisory:

References

@gasman gasman published to wagtail/wagtail May 1, 2024
Published to the GitHub Advisory Database May 1, 2024
Reviewed May 1, 2024
Published by the National Vulnerability Database May 2, 2024
Last updated May 2, 2024

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N

EPSS score

0.045%
(17th percentile)

Weaknesses

CVE ID

CVE-2024-32882

GHSA ID

GHSA-w2v8-php4-p8hc

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.