T05 · Unauthorized Access and Privilege Escalation
- Location
rules/server.py:21- Finding
Unauthenticated Cross-Origin Access to Sensitive and Destructive APIs
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent local audio-splitting tool, but its unauthenticated localhost API can expose, alter, or delete local task files too broadly.
Review before installing. Only run this bound to localhost, do not leave it running while browsing untrusted sites, avoid processing sensitive audio until auth/CORS/path validation are fixed, and use a virtual environment with pinned dependencies. Do not rely on the stated 24-hour cleanup unless you verify or add that cleanup yourself.
rules/server.py:21Unauthenticated Cross-Origin Access to Sensitive and Destructive APIs
rules/server.py:462Path Traversal in Task and Track Paths Can Reach Files Outside Intended Directories
rules/server.py:252Unbounded Upload Buffering and Unrestricted Processing Enable Resource Exhaustion
SKILL.md:50Unpinned Third-Party Dependencies Create a Non-Reproducible Supply-Chain Risk
Referenced artifact was not completely inspected
| `rules/app-page.html` | 工具主操作页面(59KB)| 上传 + 配置 + 分离 + 结果展示的完整 UI |
A cleanup endpoint that permanently deletes task output and uploaded files based only on a task_id is dangerous if exposed without strong validation, authorization, and path safety checks in the implementation. In this skill's context, the service manages local filesystem artifacts, so abuse of this endpoint could lead to unauthorized deletion of user data or broader file removal if task_id/path handling is insecure.
---
### 6. 清理任务文件 — DELETE /api/cleanup/{task_id}
**响应**:`{ "message": "已清理 N 个文件" }`
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<div class="container">
<!-- Upload Card -->
<div class="card fade-in" id="uploadCard">
<div class="card-title">📂 上传文件</div>
<div class="drop-zone" id="dropZone" onclick="document.getElementById('fileInput').click()">
The skill documentation describes code that reads and writes local files and invokes shell-level tools such as FFmpeg and package installation, but the manifest shown in SKILL.md does not declare any explicit tool scope or permission boundaries. This creates a least-privilege and transparency problem: an agent or reviewer cannot easily tell what capabilities are intended, increasing the chance of overbroad execution or unsafe deployment.
The manifest description and document content are written entirely in Chinese and present the skill as operating in that language, with no indication that users may choose another language or locale. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless clearly justified as region-specific.
The document declares lang="zh-CN", and the visible UI text throughout the page is exclusively in Simplified Chinese. Under the policy rule, forcing a specific language/locale without opt-in or documented justification is a natural-language policy violation.
UI 明确暴露“裁剪范围”“取消选择”“导出剪裁音频”等操作,且脚本通过双击设置起止点并请求后端生成剪裁文件。这种通用编辑能力可用于截取任意片段,与技能宣称的分离音轨用途不同,属于未在技能目的中声明的额外能力。
Manifest 将该技能描述为“一键将任意音频或视频分离出人声、伴奏、鼓、贝斯、钢琴等独立音轨”,触发词也集中在分离、提取伴奏、去除人声、stem splitter 等分轨场景。但此页面实际提供了设置裁剪点、调用 /api/trim 执行截取,并将裁剪后的音频导出的能力,属于独立的音频编辑功能,而不是分离功能的明显实现细节。
The manifest describes this skill as a one-click audio/video stem separation tool for extracting vocals, accompaniment, drums, bass, piano, and similar tracks. However, the code also serves an "audio editor" page and implements /api/trim, which cuts arbitrary time ranges from separated tracks using ffmpeg; that is a distinct editing capability not described in the manifest.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
duration = end_time - start_time
try:
subprocess.run([
"ffmpeg", "-y",
"-i", str(src_path),
"-ss", str(start_time),
For a skill presented as a high-level stem-splitting tool, the implementation depends on spawning ffmpeg and python3 -m demucs subprocesses rather than staying within a constrained application layer. While stem separation itself is in-scope, arbitrary process execution is a powerful capability that is not stated in the manifest and is broader than the user-facing purpose suggests.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
if is_video:
wav_path = str(OUTPUT_DIR / task_id / "source.wav")
output_base.mkdir(parents=True, exist_ok=True)
subprocess.run([
"ffmpeg", "-y", "-i", input_path,
"-vn", "-acodec", "pcm_s16le", "-ar", "44100", "-ac", "2",
wav_path,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
audio_for_demucs,
]
process = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.
"stems": stems,
"status": "completed",
"track_count": len(result_tracks),
"created_at": __import__("datetime").datetime.now().isoformat(),
})
except Exception as e:
The cleanup endpoint deletes task outputs and uploaded files for any supplied task_id, with no authentication, authorization, or ownership verification. In any shared or exposed deployment, an attacker can enumerate or obtain task IDs and delete other users' data, causing integrity loss and denial of service.
The document declares lang="zh-CN", and all visible UI text is presented only in Simplified Chinese. This imposes a specific language/locale on users without any opt-in, switcher, or clear region-specific justification, which matches the language/locale policy concern.
The natural-language description and user-facing service metadata are written only in Chinese, including the module banner and application title, with no indication that users can choose another language. Under the stated policy, forcing a specific language without user opt-in is a locale/language policy issue.
The service stores cross-session task history in a shared history.json file and exposes it via /api/history without any authentication or ownership checks. In a multi-user deployment, this leaks prior users' filenames, task IDs, models, timestamps, and whether outputs still exist, which can enable privacy violations and facilitate unauthorized access to task artifacts.