🇰🇷 한글 설명
HomeAssistant-Tapo-Control의 GitHub Actions 워크플로우(.github/workflows/issues.yml)에서 이슈 본문의 사용자 입력값이 검증 없이 Bash 명령어에 직접 삽입되는 코드 인젝션 취약점입니다. 악의적인 사용자가 이슈 생성 시 조작된 내용을 포함시켜 GitHub Actions 실행 환경에서 임의의 명령어를 실행할 수 있으며, 저장소 내용이나 GitHub Actions 암호 접근이 가능합니다. 최종 사용자의 Home Assistant 설치에는 영향을 주지 않고 저장소의 CI/CD 환경에만 영향을 미칩니다.
💡 쉬운 설명
HomeAssistant-Tapo-Control 프로젝트의 자동화 도구가 사용자가 입력한 내용을 확인하지 않고 그대로 실행하는 문제입니다. 악의적인 사용자가 프로젝트에 이슈를 등록할 때 숨겨진 명령어를 포함시켜 프로젝트 서버에서 임의의 명령을 실행할 수 있습니다.
🇺🇸 원문 (English)
HomeAssistant-Tapo-Control offers Control for Tapo cameras as a Home Assistant component. Prior to commit 2a3b80f, there is a code injection vulnerability in the GitHub Actions workflow .github/workflows/issues.yml. It does not affect users of the Home Assistant integration itself — it only impacts the GitHub Actions environment for this repository. The vulnerable workflow directly inserted user-controlled content from the issue body (github.event.issue.body) into a Bash conditional without proper sanitization. A malicious GitHub user could craft an issue body that executes arbitrary commands on the GitHub Actions runner in a privileged context whenever an issue is opened. The potential impact is limited to the repository’s CI/CD environment, which could allow access to repository contents or GitHub Actions secrets. This issue has been patched via commit 2a3b80f. Workarounds involve disabling the affected workflow (issues.yml), replacing the unsafe Bash comparison with a safe quoted grep (or a pure GitHub Actions expression check), or ensuring minimal permissions in workflows (permissions: block) to reduce possible impact.
📍 영향받는 시스템
HomeAssistant-Tapo-Control GitHub repository의 GitHub Actions 워크플로우 (commit 2a3b80f 이전 버전)
⚔️ 공격 벡터
이슈 생성 시 이슈 본문에 Bash 메타문자를 포함한 악성 코드를 삽입하여 인용되지 않은 변수 확장을 통해 임의 명령 실행
🛡️ 대응 방법
commit 2a3b80f로 업데이트하거나, 워크플로우를 비활성화하거나, Bash 비교를 인용된 grep 또는 GitHub Actions 표현식으로 교체
🔧 검증 코드
출력이 있으면 코드 인젝션 위험 있음; 출력 없으면 안전 또는 파일 미존재
grep -E '\$\{.*github\.event\.issue\.body' .github/workflows/issues.yml 2>/dev/null || grep 'github\.event\.issue\.body' .github/workflows/issues.yml 2>/dev/null | grep -v '"'