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

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

    • False
    • Hide

      None

      Show
      None
    • False

      Vulnerability Details

      CWE Type(s): CWE-78
      Severity: HIGH
      Team: Unassigned

      Location

      • File: scripts/release_notes/common.py
      • Lines: 148

      Description

      Command Injection in git commands via shell=True

      subprocess.Popen uses shell=True with user-controlled git parameters, allowing command injection via shell metacharacters

      Impact

      subprocess.Popen uses shell=True with user-controlled git parameters, allowing command injection via shell metacharacters. Attackers can execute arbitrary commands by injecting shell metacharacters (;, |, &, $, `) into git parameters like branch names or commit references.

      Root Cause

      subprocess.Popen uses shell=True with user-controlled git parameters, allowing command injection via shell metacharacters

      Fix Status

      MR Link: https://gitlab.com/redhat/rhel-ai/team-pytorch/pytorch/-/merge_requests/165
      Fix Branch: security-fix-cwe78-commitlist-git
      Status: IMPLEMENTED

      Related Exploit Files

      • test_command_injection_commitlist_git.py

      Exploit Code Sample

      # Security regression test that validates the fix
      # Test file: test_command_injection_commitlist_git.py
      
      # The test verifies:
      # 1. Proper input validation
      # 2. Safe subprocess execution
      # 3. Protection against command injection attacks
      

      References


      Generated by CI Security Bot on 2026-02-03

              Unassigned Unassigned
              pytorch-engineering PyTorch Engineering
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: