| Titolo | zackees transcribe-anything (PyPI) <=4.1.0 OS Command Injection |
|---|
| Descrizione | A vulnerability has been identified in zackees transcribe-anything up to and including version 4.1.0 (all versions; no fixed release exists). Affected is the function ytdlp_download in the file src/transcribe_anything/ytldp_download.py (the yt-dlp download component). The manipulation of the argument url leads to OS command injection.
Root cause: at ytldp_download.py line 17 the URL is interpolated into a shell command string via an f-string, cmd = f'yt-dlp --no-check-certificate -x {url} -o "out.%(ext)s"', and executed at line 19 via subprocess.run(cmd, shell=True, cwd=outdir, check=True, ...). The url value receives no quoting, escaping or validation, so shell metacharacters (; | & $(...) and backticks) break out of the intended yt-dlp invocation and run attacker-chosen commands with the privileges of the calling process.
Reachability: the sink is reachable from the public library API transcribe_anything.api.transcribe(url_or_file=...) and the transcribe console script. The only upstream guard is url_or_file.startswith('http')/('ftp') in audio.py fetch_audio, which does not block shell metacharacters. Accepting remote URLs is the package's headline feature, so url_or_file is designed to carry externally-influenced input.
Proof of concept (benign, local): ytdlp_download('http://example.com/video.mp4$(touch INJECTED_MARKER)', tempdir) creates the marker file, proving the URL broke out of the command line. The maintainer already removed shell=True from a sibling sink (_convert_to_wav, issue #96 / PR #99) but that change did not touch ytldp_download.py.
Suggested fix: pass an argument list with shell=False, subprocess.run(['yt-dlp','--no-check-certificate','-x',url,'-o','out.%(ext)s'], shell=False, ...), and validate the URL scheme.
CVSS 3.1 vector: AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H (Base 8.1). CWE-78.
Public reference (coordinated disclosure): https://github.com/zackees/transcribe-anything/issues/137
PyPI: https://pypi.org/project/transcribe-anything/
Researcher: Mykhailo Kholiev. |
|---|
| Fonte | ⚠️ https://github.com/zackees/transcribe-anything/issues/137 |
|---|
| Utente | Anonymous User |
|---|
| Sottomissione | 11/07/2026 13:12 (2 mesi fa) |
|---|
| Moderazione | 25/08/2026 16:36 (2 months later) |
|---|
| Stato | Accettato |
|---|
| Voce VulDB | 395054 [zackees transcribe-anything fino a 4.1.0 Yt-dlp Download ytldp_download.py ytdlp_download url escalationi di privilegi] |
|---|
| Punti | 20 |
|---|