Skip to content

fix: sanitize shell/subprocess call in util.go (CWE-78) - #9666

Merged
okatu-loli merged 1 commit into
AlistGo:mainfrom
anupamme:fix-repo-alist-ffmpeg-protocol-whitelist-cwe-78
Oct 13, 2026
Merged

okatu-loli merged 1 commit into
AlistGo:mainfrom
anupamme:fix-repo-alist-ffmpeg-protocol-whitelist-cwe-78

Conversation

@anupamme

@anupamme anupamme commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

The FFmpeg video processing functions pass user-controlled file paths to ffmpeg.Input() without adequate sanitization. While a sanitizeFilePath function exists, it only validates that the path is absolute, clean, and a regular file. It does not prevent command injection through FFmpeg's complex input syntax, which supports various protocols (file:, pipe:, http:, concat:, subfile:) and options that can be abused for arbitrary file read or command execution. The affected code is drivers/local/util.go:110. This change is the fix I would apply.

Reference: CWE-78

What changed

  • drivers/local/util.go

Verification

No automated check could be run against this repository, so this change is unverified beyond review. Please treat it as a suggestion.


Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security
@okatu-loli
okatu-loli merged commit 741c8a0 into AlistGo:main Oct 13, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants