PyPI: sagemaker
CVE-2024-34073
Safety vulnerability ID: SFTY-20240503-11800
Safety legacy ID: pyup.io-71630
Affected versions of the sagemaker package are vulnerable to OS Command Injection due to improper handling of the `requirements_path` parameter. The `capture_dependencies` function in the `sagemaker.serve.save_retrive.version_1_0_0.save.utils` module executes system commands based on user input without adequate validation or sanitization. An attacker can exploit this by supplying a malicious command as the "requirements_path" parameter, potentially leading to Remote Code Execution, Denial of Service, and compromising both confidentiality and integrity.
Overview
sagemaker-python-sdk Command Injection vulnerability
Advisory
Affected versions of the sagemaker package are vulnerable to OS Command Injection due to improper handling of the `requirements_path` parameter. The `capture_dependencies` function in the `sagemaker.serve.save_retrive.version_1_0_0.save.utils` module executes system commands based on user input without adequate validation or sanitization. An attacker can exploit this by supplying a malicious command as the "requirements_path" parameter, potentially leading to Remote Code Execution, Denial of Service, and compromising both confidentiality and integrity.
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20240503-11800/CVE-2024-34073
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-34073
- https://github.com/aws/sagemaker-python-sdk/commit/2d873d53f708ea570fc2e2a6974f8c3097fe9df5
- https://github.com/aws/sagemaker-python-sdk/security/advisories/GHSA-7pc3-pr3q-58vg
- https://github.com/aws/sagemaker-python-sdk/security/advisories/GHSA-7pc3-pr3q-58vg
- https://nvd.nist.gov/vuln/detail/CVE-2024-34073
- https://github.com/aws/sagemaker-python-sdk/pull/4556
- https://github.com/aws/sagemaker-python-sdk/commit/2d873d53f708ea570fc2e2a6974f8c3097fe9df5
- https://github.com/advisories/GHSA-7pc3-pr3q-58vg
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
