CVE-2024-34073: Sagemaker Sagemaker-python-sdk Command Injection Vulnerability Vulnerability
HIGHCVE-2024-34073 is a HIGH (CVSS 7.8) sagemaker-python-sdk command injection vulnerability vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Sagemaker libraries in the PyPI ecosystem. The issue involves sagemaker-python-sdk command injection vulnerability. Remediation is available by upgrading affected packages to version 2.214.3.
CVE-2024-34073 at a Glance
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).
How to Fix CVE-2024-34073
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.
pip install sagemaker>=2.214.3
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-34073, 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.214.3), 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. 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
CVE-2024-34073 Affected Sagemaker Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sagemaker
|
PyPI |
< 2.214.3
|
2.214.3
|
References
Frequently Asked Questions
What is CVE-2024-34073?
Which Sagemaker versions are affected?
What version fixes CVE-2024-34073?
Is sagemaker affected?
What is the CVSS score of CVE-2024-34073?
What CWE is associated with CVE-2024-34073?
How can I check PyPI dependencies for CVE-2024-34073?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7pc3-pr3q-58vg",
"modified" : "2024-05-03T20:26:03Z",
"published" : "2024-05-03T20:26:03Z",
"aliases" : [ "CVE-2024-34073" ],
"summary" : "sagemaker-python-sdk Command Injection vulnerability",
"details" : "### Impact\n\nThe capture_dependencies function in `sagemaker.serve.save_retrive.version_1_0_0.save.utils` module before version 2.214.3 allows for potentially unsafe Operating System (OS) Command Injection if inappropriate command is passed as the “requirements_path” parameter. 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.214.3\n\n### Credit\n\nWe would like to thank HiddenLayer for collaborating on this issue through the coordinated vulnerability disclosure process.\n\n### Workarounds\n\nDo not override the “requirements_path” parameter of capture_dependencies function in `sagemaker.serve.save_retrive.version_1_0_0.save.utils`, instead use the default value.\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. 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/4556",
"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.214.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/aws/sagemaker-python-sdk/security/advisories/GHSA-7pc3-pr3q-58vg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34073"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/sagemaker-python-sdk/pull/4556"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/sagemaker-python-sdk/commit/2d873d53f708ea570fc2e2a6974f8c3097fe9df5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/aws/sagemaker-python-sdk"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-03T20:26:03Z",
"nvd_published_at" : "2024-05-03T11:15:22Z"
}
}