CVE-2023-2970: Mindspore MindSpore Vulnerable To Memory Corruption Vulnerability

MODERATE
Advisory Identifier: GHSA-x67g-47p3-rc7f
CVSS 3.5
CWE-119
Published
Advisory Summary

CVE-2023-2970 is a MODERATE (CVSS 3.5) mindspore vulnerable to memory corruption vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Mindspore libraries in the PyPI ecosystem. The issue involves mindspore vulnerable to memory corruption. Remediation is available in the latest vendor maintenance releases.

CVE-2023-2970 at a Glance

CVE Identifier CVE-2023-2970
GHSA Identifier GHSA-x67g-47p3-rc7f
Severity MODERATE
CVSS v3.1 Base Score 3.5
CWE Classification CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
Affected Product Mindspore
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.5

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

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

How to Fix CVE-2023-2970

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

mindspore fixed: Latest secure release
pip install mindspore>=Latest secure release
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 mindspore

How to Check if You Are Affected

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

pip show mindspore

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Mindspore, 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

A vulnerability classified as problematic was found in MindSpore 2.0.0-alpha/2.0.0-rc1. This vulnerability affects the function `JsonHelper::UpdateArray` of the file `mindspore/ccsrc/minddata/dataset/util/json_helper.cc`. The manipulation leads to memory corruption. The name of the patch is 30f4729ea2c01e1ed437ba92a81e2fc098d608a9. It is recommended to apply a patch to fix this issue. The identifier of this vulnerability is VDB-230176.

CVE-2023-2970 Affected Mindspore Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
mindspore
PyPI
≤ 2.0.0-rc1

References

Frequently Asked Questions

What is CVE-2023-2970?
CVE-2023-2970 is a security vulnerability in Mindspore involving MindSpore vulnerable to memory corruption under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer.
Which Mindspore versions are affected?
Affected versions include releases prior to current release patches across affected packages: mindspore.
What version fixes CVE-2023-2970?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is mindspore affected?
Yes, mindspore is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2023-2970?
CVE-2023-2970 has a CVSS v3.1 base score of 3.5 (MODERATE) with vector string CVSS:3.0/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2023-2970?
CVE-2023-2970 is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer (The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.).
How can I check PyPI dependencies for CVE-2023-2970?
Run the dependency tree command: 'pip show mindspore'. 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-x67g-47p3-rc7f",
  "modified" : "2024-09-25T17:34:49Z",
  "published" : "2023-05-30T06:30:26Z",
  "aliases" : [ "CVE-2023-2970" ],
  "summary" : "MindSpore vulnerable to memory corruption",
  "details" : "A vulnerability classified as problematic was found in MindSpore 2.0.0-alpha/2.0.0-rc1. This vulnerability affects the function `JsonHelper::UpdateArray` of the file `mindspore/ccsrc/minddata/dataset/util/json_helper.cc`. The manipulation leads to memory corruption. The name of the patch is 30f4729ea2c01e1ed437ba92a81e2fc098d608a9. It is recommended to apply a patch to fix this issue. The identifier of this vulnerability is VDB-230176.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mindspore"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.0.0-rc1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-2970"
  }, {
    "type" : "PACKAGE",
    "url" : "https://gitee.com/mindspore/mindspore"
  }, {
    "type" : "WEB",
    "url" : "https://gitee.com/mindspore/mindspore/commit/30f4729ea2c01e1ed437ba92a81e2fc098d608a9"
  }, {
    "type" : "WEB",
    "url" : "https://gitee.com/mindspore/mindspore/issues/I73DOS"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/mindspore/PYSEC-2023-81.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.230176"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.230176"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-119" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-06T16:48:07Z",
    "nvd_published_at" : "2023-05-30T06:16:30Z"
  }
}