Uploaded image for project: 'AI Platform Core Components'
  1. AI Platform Core Components
  2. AIPCC-9571

[BOT][Security] CWE-78 in common.py:3718-3726

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Vulnerability Details

      CWE Type(s): CWE-78
      Severity: HIGH
      Team: PyTorch Compile

      Location

      • File: benchmarks/dynamo/common.py
      • Lines: 3718-3726

      Description

      Command injection vulnerability through unvalidated sys.argv elements passed directly to subprocess calls. The code passes sys.argv elements to subprocess.check_call() without proper validation, potentially allowing argument injection if an attacker can control command-line arguments.

      The vulnerable pattern constructs a command list using sys.argv without validation, which can enable injection attacks through argument confusion, flag injection, or specially crafted argument values.

      Impact

      • Argument injection via command-line parameters
      • Unauthorized command execution during benchmark warmup
      • Potential for malicious flags to be interpreted
      • CI/CD pipeline compromise if attacker can control script arguments

      Root Cause

      Direct use of sys.argv without validation in subprocess calls. Even with list-based arguments (shell=False), unvalidated command-line parameters can enable various injection attacks.

      Fix Status

      MR Link: Not yet created
      Fix Branch: N/A
      Status: UNPATCHED

      Related Exploit Files

      • test_cwe78_dynamo_sysargv.py

      Exploit Code Sample

      # VULNERABLE: cmd = [sys.executable] + sys.argv
      # subprocess.check_call(cmd)
      # FIX: Validate sys.argv elements before use
      

      Test Coverage

      Test Results: Passed: 1, Failed: 2, Skipped: 0

      References


      Generated by CI Security Bot on 2026-01-31

              Unassigned Unassigned
              rh-ee-rpunia Riya Punia
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: