CVE-2024-34072: Sagemaker Sagemaker-python-sdk Vulnerable To Deserialization Of Vulnerability

HIGH
Advisory Identifier: GHSA-wjvx-jhpj-r54r
CVSS 7.8
CWE-502
Published
Advisory Summary

CVE-2024-34072 is a HIGH (CVSS 7.8) sagemaker-python-sdk vulnerable to deserialization of vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Sagemaker libraries in the PyPI ecosystem. The issue involves sagemaker-python-sdk vulnerable to deserialization of untrusted data. Remediation is available by upgrading affected packages to version 2.218.0.

CVE-2024-34072 at a Glance

CVE Identifier CVE-2024-34072
GHSA Identifier GHSA-wjvx-jhpj-r54r
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Sagemaker
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.8

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

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

How to Fix CVE-2024-34072

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

sagemaker fixed: 2.218.0
pip install sagemaker>=2.218.0
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 sagemaker

How to Check if You Are Affected

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

pip show sagemaker

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Sagemaker, 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 sagemaker.base_deserializers.NumpyDeserializer module before v2.218.0 allows potentially unsafe deserialization when untrusted data is passed as pickled object arrays. This consequently may allow an unprivileged third party to cause remote code execution, denial of service, affecting both confidentiality and integrity. Impacted versions: <2.218.0. ### Credit We would like to thank HiddenLayer for collaborating on this issue through the coordinated vulnerability disclosure process. ### Workarounds Do not pass pickled numpy object arrays which originated from an untrusted source, or that could have been tampered with. Only pass pickled numpy object arrays from sources you trust. ### References If you have any questions or comments about this advisory we ask that you contact AWS/Amazon Security via our vulnerability reporting page [1] or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue. [1] Vulnerability reporting page: https://aws.amazon.com/security/vulnerability-reporting Fixed by: [https://github.com/aws/sagemaker-python-sdk/pull/4557](https://github.com/aws/sagemaker-python-sdk/pull/4557)

CVE-2024-34072 Affected Sagemaker Versions

1 component(s)
Fixed Versions:
2.218.0
Product / Package Ecosystem Affected Versions Fixed Version
sagemaker
PyPI
< 2.218.0
2.218.0

References

Frequently Asked Questions

What is CVE-2024-34072?
CVE-2024-34072 is a security vulnerability in Sagemaker involving sagemaker-python-sdk vulnerable to Deserialization of Untrusted Data under CWE-502: Deserialization of Untrusted Data.
Which Sagemaker versions are affected?
Affected versions include releases prior to 2.218.0 across affected packages: sagemaker.
What version fixes CVE-2024-34072?
Upgrading to 2.218.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sagemaker affected?
Yes, sagemaker is affected in releases prior to 2.218.0. Upgrade your dependency to 2.218.0 or later.
What is the CVSS score of CVE-2024-34072?
CVE-2024-34072 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-34072?
CVE-2024-34072 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check PyPI dependencies for CVE-2024-34072?
Run the dependency tree command: 'pip show sagemaker'. 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-wjvx-jhpj-r54r",
  "modified" : "2024-05-03T20:25:33Z",
  "published" : "2024-05-03T20:25:33Z",
  "aliases" : [ "CVE-2024-34072" ],
  "summary" : "sagemaker-python-sdk vulnerable to Deserialization of Untrusted Data",
  "details" : "### Impact\n\nsagemaker.base_deserializers.NumpyDeserializer module before v2.218.0 allows potentially unsafe deserialization when untrusted data is passed as pickled object arrays. This consequently may allow an unprivileged third party to cause remote code execution, denial of service, affecting both confidentiality and integrity.\n\nImpacted versions: <2.218.0.\n\n### Credit \n\nWe would like to thank HiddenLayer for collaborating on this issue through the coordinated vulnerability disclosure process.\n\n\n### Workarounds\n\nDo not pass pickled numpy object arrays which originated from an untrusted source, or that could have been tampered with. Only pass pickled numpy object arrays from sources you trust.\n\n\n### References\n\nIf you have any questions or comments about this advisory we ask that you contact AWS/Amazon Security via our vulnerability reporting page [1] or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.\n[1] Vulnerability reporting page: https://aws.amazon.com/security/vulnerability-reporting\n\nFixed by: [https://github.com/aws/sagemaker-python-sdk/pull/4557](https://github.com/aws/sagemaker-python-sdk/pull/4557)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "sagemaker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.218.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/aws/sagemaker-python-sdk/security/advisories/GHSA-wjvx-jhpj-r54r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34072"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aws/sagemaker-python-sdk/pull/4557"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aws/sagemaker-python-sdk/commit/72e0c9712aec6fbb82fb40fda091dfc2a42c70a0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/aws/sagemaker-python-sdk"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-03T20:25:33Z",
    "nvd_published_at" : "2024-05-03T11:15:22Z"
  }
}