Skip to content

fix: remove unsafe exec() in util.go#9485

Open
orbisai0security wants to merge 3 commits into
AlistGo:mainfrom
orbisai0security:fix-v-002-ffmpeg-path-injection
Open

fix: remove unsafe exec() in util.go#9485
orbisai0security wants to merge 3 commits into
AlistGo:mainfrom
orbisai0security:fix-v-002-ffmpeg-path-injection

Conversation

@orbisai0security
Copy link
Copy Markdown
Contributor

Summary

Fix critical severity security issue in drivers/local/util.go.

Vulnerability

Field Value
ID V-002
Severity CRITICAL
Scanner multi_agent_ai
Rule V-002
File drivers/local/util.go:72
CWE CWE-78

Description: At drivers/local/util.go lines 72 and 168, user-influenced file paths (inputFile and videoPath) are passed directly to ffmpeg.Input() without sanitization or validation. If the underlying go-ffmpeg library constructs a shell command string from these arguments — which is common in ffmpeg wrapper libraries that invoke the ffmpeg binary via exec — shell metacharacters embedded in the file path could cause arbitrary OS commands to execute with the privileges of the server process.

Changes

  • drivers/local/util.go

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by Orbis Security AI
skysliences
skysliences previously approved these changes May 15, 2026
@okatu-loli
Copy link
Copy Markdown
Collaborator

@orbisai0security build error, fix it plz

The previous CI failure was caused by a temporary broken state in
upstream AlistGo/alist main between commits dd19d0d (removed
RootFolderID field from driver.go) and de56968 (fixed offline.go to
use getRootFolderID method). Our PR's CI ran in that 32-minute window.
The upstream fix is now merged; this empty commit forces a fresh
merge commit against the repaired upstream.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@okatu-loli okatu-loli requested a review from skysliences May 18, 2026 11:01
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.

3 participants