Credential Access
High
- Category
- Privilege Escalation
- Content
set -e # 加载环境变量 if [ -f .env ]; then source .env fi- Confidence
- 95% confidence
- Finding
- The script executes 'source .env', which causes the shell to run any commands contained in that file, not just read credentials. If an attacker can modify .env or influence the working directory, they can achieve arbitrary code execution when the backup script runs, which is especially dangerous because backup jobs often run with elevated privileges and access to sensitive databases.
