🇰🇷 한글 설명
react-native-bottom-tabs 0.9.2 이하 버전의 GitHub Actions 워크플로우가 pull_request_target 이벤트를 부정확하게 사용하여, 포크된 PR의 신뢰할 수 없는 코드가 권한 있는 컨텍스트에서 실행될 수 있습니다. 공격자는 package.json에 악의적인 preinstall 스크립트를 포함한 PR을 생성한 후 특정 댓글(!canary)을 통해 워크플로우를 트리거하여 GITHUB_TOKEN과 NPM_TOKEN 같은 민감한 시크릿을 탈취하거나 악의적인 코드를 배포할 수 있습니다.
💡 쉬운 설명
react-native-bottom-tabs 라이브러리의 자동 배포 스크립트에 보안 결함이 있어서, 악의적인 사용자가 특정 댓글을 남기면 악의적인 코드를 실행시킬 수 있습니다. 이를 통해 민감한 보안 인증정보가 도용되거나 가짜 버전의 라이브러리가 배포될 수 있습니다.
🇺🇸 원문 (English)
react-native-bottom-tabs is a library of Native Bottom Tabs for React Native. In versions 0.9.2 and below, the github/workflows/release-canary.yml GitHub Actions repository workflow improperly used the pull_request_target event trigger, which allowed for untrusted code from a forked pull request to be executed in a privileged context. An attacker could create a pull request containing a malicious preinstall script in the package.json file and then trigger the vulnerable workflow by posting a specific comment (!canary). This allowed for arbitrary code execution, leading to the exfiltration of sensitive secrets such as GITHUB_TOKEN and NPM_TOKEN, and could have allowed an attacker to push malicious code to the repository or publish compromised packages to the NPM registry. There is a remediation commit which removes github/workflows/release-canary.yml, but a version with this fix has yet to be released.
📍 영향받는 시스템
react-native-bottom-tabs v0.9.2 이하
⚔️ 공격 벡터
악의적인 preinstall 스크립트가 포함된 PR 생성 후 특정 댓글 트리거를 통한 워크플로우 실행
🛡️ 대응 방법
react-native-bottom-tabs를 최신 버전으로 업그레이드 (release-canary.yml 워크플로우가 제거된 패치 버전 설치)
🔧 검증 코드
설치된 버전이 0.9.3 이상이면 안전하고, 0.9.2 이하면 취약한 상태입니다. 패키지가 설치되지 않았으면 영향받지 않습니다.
npm list react-native-bottom-tabs 2>/dev/null | grep -E 'react-native-bottom-tabs'