🇰🇷 한글 설명
aquasecurity/trivy-action 0.31.0부터 0.33.1 버전에서 환경 변수 내보내기 과정 중 명령 주입 취약점이 발견되었습니다. 공격자가 제어 가능한 입력값이 적절한 셸 이스케이프 없이 파일에 기록되어, GitHub Actions 실행 환경에서 임의의 명령이 실행될 수 있습니다.
💡 쉬운 설명
GitHub에서 사용하는 보안 검사 도구에 입력값을 잘못 처리하는 허점이 있어, 나쁜 코드가 포함된 값을 넣으면 해커가 컴퓨터를 마음대로 조종할 수 있습니다. 사용자가 입력한 특수 문자가 명령어로 실행되는 것이 원인입니다.
🇺🇸 원문 (English)
Trivy Action runs Trivy as GitHub action to scan a Docker container image for vulnerabilities. A command injection vulnerability exists in `aquasecurity/trivy-action` versions 0.31.0 through 0.33.1 due to improper handling of action inputs when exporting environment variables. The action writes `export VAR=<input>` lines to `trivy_envs.txt` based on user-supplied inputs and subsequently sources this file in `entrypoint.sh`. Because input values are written without appropriate shell escaping, attacker-controlled input containing shell metacharacters (e.g., `$(...)`, backticks, or other command substitution syntax) may be evaluated during the sourcing process. This can result in arbitrary command execution within the GitHub Actions runner context. Version 0.34.0 contains a patch for this issue. The vulnerability is exploitable when a consuming workflow passes attacker-controlled data into any action input that is written to `trivy_envs.txt`. Access to user input is required by the malicious actor. Workflows that do not pass attacker-controlled data into `trivy-action` inputs, workflows that upgrade to a patched version that properly escapes shell values or eliminates the `source ./trivy_envs.txt` pattern, and workflows where user input is not accessible are not affected.
📍 영향받는 시스템
aquasecurity/trivy-action versions 0.31.0 through 0.33.1
⚔️ 공격 벡터
공격자가 제어하는 입력값이 trivy-action의 입력값으로 전달되어 셸 메타문자가 포함된 경우 명령 주입 발생
🛡️ 대응 방법
trivy-action을 패치가 적용된 버전인 0.34.0 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 0.31.0에서 0.33.1 사이라면 해당 취약점에 노출된 상태입니다.
echo "0.32.0" | grep -E '0.31.0|0.32.0|0.33.1'