subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
["tar", "czf", "-", *exclude_flags, "-C", str(SOURCE_DIR), "."], stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) gpg = subprocess.Popen( [ "gpg", "--batch", "--yes", "--passphrase", password, "--symmetric", "--cipher-algo", "AES256",- Confidence
- 95% confidence
- Finding
- The script passes the backup password to gpg on the command line via --passphrase. On many systems, process arguments can be observed by other local users or recorded by auditing/process-monitoring tools, exposing the encryption secret and allowing decryption of all uploaded backups.
