Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

modelscope/ms-agent
main @ 8aa5c00
3
Fixes
1
CVEs
CRITICAL
Peak severity
Highlights
Auth Bypass: 1 prior fix. Scrutinize any change in this area.
apps/agentfabric/gradio_utils.py: most-fixed (1 issue). Treat as high-risk during review.
2 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Command Injection: Insecure handling of shell execution tools allowed attackers to bypass regex restrictions and execute arbitrary shell commands. This is particularly dangerous in agentic environments where LLM-generated or user-controlled input directly reaches OS-level sinks like subprocess.run, as highlighted in CVE-2026-2256.
Auth Bypass: Sensitive routes like the preview chat API endpoint were exposed without proper token validation, allowing unauthorized users to bypass security boundaries. Enforcing strict header-based validation is necessary to secure internal endpoints from unauthorized access.
Cross-Site Scripting (XSS): The rendering of application metadata (such as the bot name and description) directly into HTML within Gradio utility scripts allowed for stored or reflected XSS attacks. Proper escaping using standard sanitization libraries is critical when dynamically constructing UI content.