CVE-2024-35228: Wagtail Improper Handling Of Insufficient Permissions Vulnerability

MODERATE
Advisory Identifier: GHSA-xxfm-vmcf-g33f
CVSS 5.5
CWE-280
Published
Advisory Summary

CVE-2024-35228 is a MODERATE (CVSS 5.5) improper handling of insufficient permissions vulnerability (CWE-280: Improper Handling of Insufficient Permissions or Privileges) affecting Wagtail libraries in the PyPI ecosystem. The issue involves improper handling of insufficient permissions in `wagtail.contrib.settings`. Remediation is available by upgrading affected packages to version 6.0.5, 6.1.2.

CVE-2024-35228 at a Glance

CVE Identifier CVE-2024-35228
GHSA Identifier GHSA-xxfm-vmcf-g33f
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-280: Improper Handling of Insufficient Permissions or Privileges
Affected Product Wagtail
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-35228

To remediate this vulnerability, upgrade all affected Wagtail dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

wagtail fixed: 6.0.5
pip install wagtail>=6.0.5
wagtail fixed: 6.1.2
pip install wagtail>=6.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show wagtail

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-35228, inspect your installed packages using pip:

pip show wagtail

Analyze the terminal output to locate any version of Wagtail in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.0.5), your application is affected.

Note: The pip show wagtail command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-280: Improper Handling of Insufficient Permissions or Privileges, where 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. In Wagtail, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: * Visit Wagtail's [support channels](https://docs.wagtail.io/en/stable/support.html) * Email us at [security@wagtail.org](mailto:security@wagtail.org) (view our [security policy](https://github.com/wagtail/wagtail/security/policy) for more information).

CVE-2024-35228 Affected Wagtail Versions

2 component(s)
Fixed Versions:
6.0.56.1.2
Product / Package Ecosystem Affected Versions Fixed Version
wagtail
PyPI
≥ 6.0.0
< 6.0.5
6.0.5
wagtail
PyPI
≥ 6.1.0
< 6.1.2
6.1.2

References

Frequently Asked Questions

What is CVE-2024-35228?
CVE-2024-35228 is a security vulnerability in Wagtail involving Improper Handling of Insufficient Permissions in `wagtail.contrib.settings` under CWE-280: Improper Handling of Insufficient Permissions or Privileges.
Which Wagtail versions are affected?
Affected versions include releases prior to 6.0.5, 6.1.2 across affected packages: wagtail.
What version fixes CVE-2024-35228?
Upgrading to 6.0.5, 6.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is wagtail affected?
Yes, wagtail is affected in releases prior to 6.0.5, 6.1.2. Upgrade your dependency to 6.0.5, 6.1.2 or later.
What is the CVSS score of CVE-2024-35228?
CVE-2024-35228 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:H/A:N.
What CWE is associated with CVE-2024-35228?
CVE-2024-35228 is classified under 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 can I check PyPI dependencies for CVE-2024-35228?
Run the dependency tree command: 'pip show wagtail'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xxfm-vmcf-g33f",
  "modified" : "2024-06-02T22:28:28Z",
  "published" : "2024-06-02T22:28:28Z",
  "aliases" : [ "CVE-2024-35228" ],
  "summary" : "Improper Handling of Insufficient Permissions in `wagtail.contrib.settings`",
  "details" : "### Impact\nDue 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.\n\n### Patches\nPatched versions have been released as Wagtail 6.0.5 and 6.1.2. Wagtail releases prior to 6.0 are unaffected.\n\n### Workarounds\n\nNo workaround is available.\n\n### Acknowledgements\n\nMany thanks to Victor Miti for reporting this issue.\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n* Visit Wagtail's [support channels](https://docs.wagtail.io/en/stable/support.html)\n* Email us at [security@wagtail.org](mailto:security@wagtail.org) (view our [security policy](https://github.com/wagtail/wagtail/security/policy) for more information).\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "wagtail"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.0.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "wagtail"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.1.0"
      }, {
        "fixed" : "6.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/wagtail/wagtail/security/advisories/GHSA-xxfm-vmcf-g33f"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-35228"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wagtail/wagtail/commit/284f75a6f91f7ab18cc304d7d34f33b559ae37b1"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wagtail/wagtail"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-280" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-06-02T22:28:28Z",
    "nvd_published_at" : "2024-05-30T19:15:16Z"
  }
}