Skip to content

fix: use subprocess instead of os.system in data_analyzer.py#7994

Open
orbisai0security wants to merge 1 commit intodeepspeedai:masterfrom
orbisai0security:fix-v-001-shell-injection-data-analyzer
Open

fix: use subprocess instead of os.system in data_analyzer.py#7994
orbisai0security wants to merge 1 commit intodeepspeedai:masterfrom
orbisai0security:fix-v-001-shell-injection-data-analyzer

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in deepspeed/runtime/data_pipeline/data_sampling/data_analyzer.py.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File deepspeed/runtime/data_pipeline/data_sampling/data_analyzer.py:75

Description: The data_analyzer.py file uses os.system() with an f-string that directly interpolates the variable metric_to_sample_fname into a shell command without any sanitization. This variable is derived from user-supplied dataset configuration or file paths. Because os.system() invokes a shell interpreter, any shell metacharacters in the variable (semicolons, backticks, dollar signs, pipes, ampersands) will be interpreted and executed as separate shell commands.

Changes

  • deepspeed/runtime/data_pipeline/data_sampling/data_analyzer.py

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by Orbis Security AI

Signed-off-by: orbisai0security <mediratta01.pally@gmail.com>
@orbisai0security orbisai0security requested a review from tjruwase as a code owner May 6, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant