T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:37
- Finding
- Unverified FFmpeg Binary Download from a Third-Party Distribution Source<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:37`; `scripts/ms_tts_chunked_bgm.py:390-395` **Vulnerability Type**: Unverified third-party executable dependency **Risk Level**: Medium ### Vulnerable Code From `SKILL.md:37`: ```markdown | `ffmpeg` | `curl -L .../ffmpeg.zip -o /tmp/ffmpeg.zip && unzip /tmp/ffmpeg.zip -d /tmp/ffmpeg_bin` | WAV 转 MP3、BGM 混音 | ``` From `scripts/ms_tts_chunked_bgm.py:390-395`: ```python if ffmpeg_path is None: print('[MS-TTS-BGM] Warning: ffmpeg not found, outputting WAV instead.') print('[MS-TTS-BGM] Install ffmpeg: curl -L https://evermeet.cx/ffmpeg/getrelease/ffmpeg/zip -o /tmp/ffmpeg.zip && unzip /tmp/ffmpeg.zip -d /tmp/ffmpeg_bin') if bgm_path: raise RuntimeError('ffmpeg is required when --bgm is provided.') ``` ### Technical Analysis The Skill recommends downloading a precompiled FFmpeg archive from `evermeet.cx`, which is a third-party distribution source rather than an official FFmpeg release channel or a trusted operating-system package repository. The command uses a moving release endpoint and does not: - Pin an exact FFmpeg version. - Verify a cryptographic checksum. - Verify a release signature. - Validate the archive contents before extraction. - Validate the ownership or integrity of the resulting executable. Consequently, the binary eventually executed by the Skill can differ from the artifact originally reviewed. A compromise of the distribution service, its release pipeline, or the downloaded archive could introduce an attacker-controlled executable. The command is presented as installation guidance rather than being executed automatically by the Python script. Exploitation therefore requires a user or agent to follow the displayed installation command. ### Attack Path 1. The expected FFmpeg executable is unavailable on the host. 2. The Skill prints or presents the recommended `curl` and `unzip` installation command. 3. A user or agent follows that guidance. 4. The th ...[truncated 935 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace the third-party moving download endpoint with an operating-system package manager or another explicitly trusted distribution channel. 2. If a standalone binary is necessary, pin an exact release version and expected platform. 3. Publish and verify a trusted SHA-256 or stronger digest before extracting or executing the archive. 4. Verify upstream release signatures where available. 5. Extract into a newly created, user-owned directory rather than a predictable shared `/tmp` path. 6. Inspect the archive for absolute paths, parent-directory traversal, links, and unexpected files before extraction. 7. Store the verified executable in a non-shared application or user data directory with restrictive permissions. 8. Document the external source, pinned version, expected digest, and trust assumptions in `SKILL.md`. ]]>
