Summary
CVE-2026-51866 is a critical code injection / remote code execution vulnerability in DB-GPT, an open-source AI data agent framework developed by eosphoros-ai. A skill script uploaded through the /api/v1/skills/upload endpoint can later be executed via the /api/v1/chat/react-agent flow, allowing an attacker to run arbitrary code on the host server. The issue affects DB-GPT versions 0.7.5 and 0.8.0 and carries a CVSS v3.1 base score of 9.8 (Critical).
Technical details
- Root cause:
SkillManager.execute_skill_script_filereads the content of a previously uploaded skill script, wraps it as executable Python code, and launches it viaasyncio.create_subprocess_exec()without adequate sanitization, isolation, or integrity verification. - Trigger conditions: An attacker first uploads a malicious skill package/script through the legitimate
/api/v1/skills/uploadroute, then triggers execution of that skill by invoking the/api/v1/chat/react-agentendpoint, which selects and runs the uploaded script with the privileges of the application server. - Attack vector: Network-based (AV:N), no privileges required (PR:N), and no user interaction needed (UI:N) — exploitation uses only the application’s own documented upload and chat/agent APIs.
- Impact: Full compromise of confidentiality, integrity, and availability, since the vulnerability results in arbitrary code execution on the host running DB-GPT.
Affected software
- DB-GPT version 0.7.5
- DB-GPT version 0.8.0 (including pre-release build 0.8.0rc6)
Severity
- CVSS v3.1 Base Score: 9.8 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate: Upgrade DB-GPT to a release that includes the fix merged via pull request #3071, which adds execution gates to
SkillManager.execute_script(),SkillManager.get_skill_resource(), andSkillManager.execute_skill_script_file()to block execution of scripts uploaded to theskills/user/directory. - If immediate upgrade is not possible: Set the environment variable
DBGPT_DISABLE_PERSONAL_SKILL_SCRIPT_EXECUTION=trueto explicitly disable execution of personal/uploaded skill scripts while retaining built-in skill functionality. - Additional hardening: Restrict network exposure of DB-GPT instances (do not expose the skill-upload and chat/react-agent APIs directly to the internet), enforce authentication and access controls on the
/api/v1/skills/uploadendpoint, and audit any previously uploaded skills for malicious content.

