Skip to content

GHSA-xxfm-vmcf-g33f CVE-2024-35228 PYSEC-2026-2032

Improper Handling of Insufficient Permissions in `wagtail.contrib.settings`

Medium PyPI
Severity
5.5 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.33%
Chance of exploitation in the next 30 days. Higher than 26.48% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-280 Improper Handling of Insufficient Permissions or Privileges
Fix
6.0.5
Upgrade wagtail to this version or later

Description

Impact

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.

Patches

Patched versions have been released as Wagtail 6.0.5 and 6.1.2. Wagtail releases prior to 6.0 are unaffected.

Workarounds

No workaround is available.

Acknowledgements

Many thanks to Victor Miti for reporting this issue.

For more information

If you have any questions or comments about this advisory:

Affected versions

PyPI

PackageVulnerableFixed in
wagtail
>= 6.0.0, < 6.0.5
6.0.5
wagtail
>= 6.1.0, < 6.1.2
6.1.2
wagtail
>= 6.0.0, < 6.0.5
>= 6.1.0, < 6.1.2
6.0.5
6.1.2

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

wagtail PyPI → 6.0.5

pip
pip install --upgrade "wagtail>=6.0.5"
poetry
poetry add "wagtail>=6.0.5"
uv
uv add "wagtail>=6.0.5"

Severity breakdown

CVSS 3.1 5.5

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:H/A:N

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

Weakness

CWE-280: Improper Handling of Insufficient Permissions or Privileges

The product does not handle or incorrectly handles when it has insufficient privileges to access resources or functionality as specified by their permissions. This may cause it to follow unexpected code paths that may leave the product in an invalid state.

How to prevent it
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
  • Implementation: Always check to see if you have successfully accessed a resource or system functionality, and use proper error handling if it is unsuccessful. Do this even when you are operating in a highly privileged mode, because errors or environmental conditions might still cause a failure. For example, environments with highly granular permissions/privilege models, such as Windows or Linux capabilities, can cause unexpected failures.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-jm5p-837g-rv8g
Wagtail: Improper restriction handling on Page translation API endpoint
Medium Also affects wagtail
GHSA-x5cx-w6p2-mxf2
Wagtail: Improper permission handling when copying snippets
Medium Also affects wagtail
GHSA-c2xx-cjmh-9q8f
Wagtail: Improper restriction handling on descendant collections in Documents and Images API
Medium Also affects wagtail
GHSA-92hv-j533-69wc
Wagtail: Identification of documents by SHA1 hash
Low Also affects wagtail
GHSA-3vrh-m9w7-v94f
Wagtail: Improper restriction handling on Pages admin API
Medium Also affects wagtail
GHSA-23m2-mghx-vqmf
Wagtail: Reflected XSS in dynamic image URL generator view
High Also affects wagtail
GHSA-8634-mr4j-r72c
Wagtail: Pages translations can be created without page permissions when using simple_translation
Medium Also affects wagtail
GHSA-r6p4-grq7-xm4m
Wagtail: Improper permission handling in image preview
Medium Also affects wagtail
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor