CVE-2024-51734: AccessControl Access Control Vulnerable To User Vulnerability

MODERATE
Advisory Identifier: GHSA-g5vw-3h65-2q3v
CVSS 9.1
CWE-284 CWE-269
Published
Advisory Summary

CVE-2024-51734 is a MODERATE (CVSS 9.1) access control vulnerable to user vulnerability (CWE-284: Improper Access Control) affecting AccessControl libraries in the PyPI ecosystem. The issue involves access control vulnerable to user data deletion by anonynmous users. Remediation is available by upgrading affected packages to version 7.2, 5.11.1.

CVE-2024-51734 at a Glance

CVE Identifier CVE-2024-51734
GHSA Identifier GHSA-g5vw-3h65-2q3v
Severity MODERATE
CVSS v3.1 Base Score 9.1
CWE Classification CWE-284: Improper Access Control
Affected Product AccessControl
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.1

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

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

How to Fix CVE-2024-51734

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

AccessControl fixed: 7.2
pip install AccessControl>=7.2
Zope fixed: 5.11.1
pip install Zope>=5.11.1
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 AccessControl

How to Check if You Are Affected

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

pip show AccessControl

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In AccessControl, 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 Anonymous users can delete the user data maintained by an `AccessControl.userfolder.UserFolder` which may prevent any privileged access. ### Patches The problem is fixed in version 7.2. ### Workarounds The problem can be fixed by adding `data__roles__ = ()` to `AccessControl.userfolder.UserFolder`. ### References https://github.com/zopefoundation/AccessControl/issues/159

CVE-2024-51734 Affected AccessControl Versions

2 component(s)
Fixed Versions:
7.25.11.1
Product / Package Ecosystem Affected Versions Fixed Version
AccessControl
PyPI
< 7.2
7.2
Zope
PyPI
< 5.11.1
5.11.1

References

Frequently Asked Questions

What is CVE-2024-51734?
CVE-2024-51734 is a security vulnerability in AccessControl involving Access control vulnerable to user data deletion by anonynmous users under CWE-284: Improper Access Control.
Which AccessControl versions are affected?
Affected versions include releases prior to 7.2, 5.11.1 across affected packages: AccessControl, Zope.
What version fixes CVE-2024-51734?
Upgrading to 7.2, 5.11.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is AccessControl affected?
Yes, AccessControl is affected in releases prior to 7.2. Upgrade your dependency to 7.2 or later.
Is Zope affected?
Yes, Zope is affected in releases prior to 5.11.1. Upgrade your dependency to 5.11.1 or later.
What is the CVSS score of CVE-2024-51734?
CVE-2024-51734 has a CVSS v3.1 base score of 9.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2024-51734?
CVE-2024-51734 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check PyPI dependencies for CVE-2024-51734?
Run the dependency tree command: 'pip show AccessControl'. 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-g5vw-3h65-2q3v",
  "modified" : "2024-11-05T14:39:51Z",
  "published" : "2024-11-04T23:23:35Z",
  "aliases" : [ "CVE-2024-51734" ],
  "summary" : "Access control vulnerable to user data deletion by anonynmous users",
  "details" : "### Impact\nAnonymous users can delete the user data maintained by an `AccessControl.userfolder.UserFolder` which may prevent any privileged access.\n\n### Patches\nThe problem is fixed in version 7.2.\n\n### Workarounds\nThe problem can be fixed by adding `data__roles__ = ()` to `AccessControl.userfolder.UserFolder`.\n\n### References\nhttps://github.com/zopefoundation/AccessControl/issues/159",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "AccessControl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Zope"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.11.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/zopefoundation/AccessControl/security/advisories/GHSA-g5vw-3h65-2q3v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-51734"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zopefoundation/AccessControl/issues/159"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zopefoundation/AccessControl"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269", "CWE-284" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-04T23:23:35Z",
    "nvd_published_at" : "2024-11-04T23:15:05Z"
  }
}