VYPR
High severity7.8NVD Advisory· Published May 3, 2024· Updated Apr 15, 2026

CVE-2024-34073

CVE-2024-34073

Description

sagemaker-python-sdk is a library for training and deploying machine learning models on Amazon SageMaker. In affected versions the capture_dependencies function in sagemaker.serve.save_retrive.version_1_0_0.save.utils module 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. This issue has been addressed in version 2.214.3. Users are advised to upgrade. Users unable to upgrade should not override the “requirements_path” parameter of capture_dependencies function in sagemaker.serve.save_retrive.version_1_0_0.save.utils, and instead use the default value.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
sagemakerPyPI
< 2.214.32.214.3

Patches

1
2d873d53f708

[Fix] Switch to subprocess in ModelBuilder when capturing dependencies (#4556)

1 file changed · +4 3
  • src/sagemaker/serve/save_retrive/version_1_0_0/save/utils.py+4 3 modified
    @@ -5,6 +5,7 @@
     import hashlib
     import os
     import logging
    +import subprocess
     import sys
     import platform
     from collections import defaultdict
    @@ -98,10 +99,10 @@ def capture_dependencies(requirements_path: str):
                 f.write(sagemaker_dependency)
             return
     
    -    command = f"pigar gen -f {Path(requirements_path)} {os.getcwd()}"
    -    logging.info("Running command %s", command)
    +    command = ["pigar", "gen", "-f", str(Path(requirements_path)), str(os.getcwd())]
    +    logging.info("Running command: %s", " ".join(command))
     
    -    os.system(command)
    +    subprocess.run(command, check=True, capture_output=True)
         logger.info("Dependencies captured successfully")
     
     
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.