🔍 CVE-2024-47179

8.8
CVSS Score
HIGH
2024-09-26
2026-04-15 00:35
✅ 완료

🇰🇷 한글 설명

RSSHub의 docker-test-cont.yml 워크플로우가 업로드된 아티팩트를 검증 없이 추출하여 악성 파일 포함 가능. PR을 통해 악의적인 package.json을 주입하여 워크플로우 내에서 임의의 코드 실행 가능 (리포지토리 탈취).

💡 쉬운 설명

RSSHub 프로젝트의 자동화 작업이 누군가의 파일을 확인 없이 그냥 받아서 사용했습니다. 해커가 나쁜 코드가 숨겨진 파일을 보내면 프로젝트 전체가 위험해질 수 있습니다.

🇺🇸 원문 (English)

RSSHub is an RSS network. Prior to commit 64e00e7, RSSHub's `docker-test-cont.yml` workflow is vulnerable to Artifact Poisoning, which could have lead to a full repository takeover. Downstream users of RSSHub are not vulnerable to this issue, and commit 64e00e7 fixed the underlying issue and made the repository no longer vulnerable. The `docker-test-cont.yml` workflow gets triggered when the `PR - Docker build test` workflow completes successfully. It then collects some information about the Pull Request that triggered the triggering workflow and set some labels depending on the PR body and sender. If the PR also contains a `routes` markdown block, it will set the `TEST_CONTINUE` environment variable to `true`. The workflow then downloads and extracts an artifact uploaded by the triggering workflow which is expected to contain a single `rsshub.tar.zst` file. However, prior to commit 64e00e7, it did not validate and the contents were extracted in the root of the workspace overriding any existing files. Since the contents of the artifact were not validated, it is possible for a malicious actor to send a Pull Request which uploads, not just the `rsshub.tar.zst` compressed docker image, but also a malicious `package.json` file with a script to run arbitrary code in the context of the privileged workflow. As of commit 64e00e7, this scenario has been addressed and the RSSHub repository is no longer vulnerable.

📍 영향받는 시스템

RSSHub commit 64e00e7 이전 버전 (다운스트림 사용자는 영향 없음)

⚔️ 공격 벡터

Pull Request를 통해 악성 package.json을 포함한 아티팩트를 업로드하여 CI/CD 워크플로우에서 임의의 코드 실행

🛡️ 대응 방법

RSSHub를 commit 64e00e7 이상으로 업데이트 또는 docker-test-cont.yml에서 아티팩트 검증 로직 추가

🔧 검증 코드

PATCHED가 나오면 안전, VULNERABLE이 나오면 취약점 있음을 의미합니다.

Shell / Script
test -f .github/workflows/docker-test-cont.yml && grep -q 'validate\|verify\|checksum' .github/workflows/docker-test-cont.yml && echo 'PATCHED' || echo 'VULNERABLE'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Docker