CVE-2024-28718: Magnum OpenStack Magnum Vulnerable To Time-of-check Vulnerability

MODERATE
Advisory Identifier: GHSA-jx7x-9r98-h5xr
CVSS 6.3
CWE-367
Published
Advisory Summary

CVE-2024-28718 is a MODERATE (CVSS 6.3) openstack magnum vulnerable to time-of-check vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Magnum libraries in the PyPI ecosystem. The issue involves openstack magnum vulnerable to time-of-check to time-of-use (toctou) attack. Remediation is available by upgrading affected packages to version 14.1.2, 17.0.2, 16.0.2, 15.0.2.

CVE-2024-28718 at a Glance

CVE Identifier CVE-2024-28718
GHSA Identifier GHSA-jx7x-9r98-h5xr
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
Affected Product Magnum
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.3

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

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

How to Fix CVE-2024-28718

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

magnum fixed: 14.1.2
pip install magnum>=14.1.2
magnum fixed: 17.0.2
pip install magnum>=17.0.2
magnum fixed: 16.0.2
pip install magnum>=16.0.2
magnum fixed: 15.0.2
pip install magnum>=15.0.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 magnum

How to Check if You Are Affected

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

pip show magnum

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Magnum, 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

An issue in OpenStack magnum yoga-eom version allows a remote attacker to execute arbitrary code via the cert_manager.py. component.

CVE-2024-28718 Affected Magnum Versions

4 component(s)
Fixed Versions:
14.1.217.0.216.0.215.0.2
Product / Package Ecosystem Affected Versions Fixed Version
magnum
PyPI
< 14.1.2
14.1.2
magnum
PyPI
≥ 17.0.0.0rc1
< 17.0.2
17.0.2
magnum
PyPI
≥ 16.0.0.0rc1
< 16.0.2
16.0.2
magnum
PyPI
≥ 15.0.0.0rc1
< 15.0.2
15.0.2

References

Frequently Asked Questions

What is CVE-2024-28718?
CVE-2024-28718 is a security vulnerability in Magnum involving OpenStack magnum vulnerable to time-of-check to time-of-use (TOCTOU) attack under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition.
Which Magnum versions are affected?
Affected versions include releases prior to 14.1.2, 17.0.2, 16.0.2, 15.0.2 across affected packages: magnum.
What version fixes CVE-2024-28718?
Upgrading to 14.1.2, 17.0.2, 16.0.2, 15.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is magnum affected?
Yes, magnum is affected in releases prior to 14.1.2, 17.0.2, 16.0.2, 15.0.2. Upgrade your dependency to 14.1.2, 17.0.2, 16.0.2, 15.0.2 or later.
What is the CVSS score of CVE-2024-28718?
CVE-2024-28718 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2024-28718?
CVE-2024-28718 is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition (The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.).
How can I check PyPI dependencies for CVE-2024-28718?
Run the dependency tree command: 'pip show magnum'. 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-jx7x-9r98-h5xr",
  "modified" : "2024-04-12T21:21:50Z",
  "published" : "2024-04-12T15:37:19Z",
  "aliases" : [ "CVE-2024-28718" ],
  "summary" : "OpenStack magnum vulnerable to time-of-check to time-of-use (TOCTOU) attack",
  "details" : "An issue in OpenStack magnum yoga-eom version allows a remote attacker to execute arbitrary code via the cert_manager.py. component.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "magnum"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "magnum"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "17.0.0.0rc1"
      }, {
        "fixed" : "17.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "magnum"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "16.0.0.0rc1"
      }, {
        "fixed" : "16.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "magnum"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.0.0.0rc1"
      }, {
        "fixed" : "15.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-28718"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openstack/magnum/commit/272fd686d8c8bf5954e9e7d3bc991ff27e46184d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openstack/magnum/commit/312aa6a86ac8e62f6ed4f1e9473fdabbbb7a4b1e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openstack/magnum/commit/883b40b5b0ecfc5f78758143c0d3c754458f12b7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openstack/magnum/commit/e79907c521149872c1b495355a3a7b3a0c7e3479"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.launchpad.net/magnum/+bug/2047690"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/Fewword/f098d8d6375ac25e27b18c0e57be532f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openstack/magnum"
  }, {
    "type" : "WEB",
    "url" : "https://review.opendev.org/c/openstack/magnum/+/907305"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-367" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-12T21:21:50Z",
    "nvd_published_at" : "2024-04-12T13:15:15Z"
  }
}