/

CVE-2026-123018

Severity:

HIGH RISK

(8.3)

Code Injection (CWE-94) in DB-GPT CodeAction Handler Path

CVE-2026-123018

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-74, CWE-94

Impact:

Potential code execution in the DB-GPT process context

Severity:

HIGH RISK

(8.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

DB-GPT has a code injection flaw in the CodeAction component's execute_code function in code_utils.py. If attacker-controlled input can reach this function, a remote attacker may cause code to be executed with the privileges of the DB-GPT process.

DB-GPT has a code injection flaw in the CodeAction component's execute_code function in code_utils.py. If attacker-controlled input can reach this function, a remote attacker may cause code to be executed with the privileges of the DB-GPT process.

Affected context

The issue affects the CodeAction component in eosphoros-ai DB-GPT, in the execute_code function in code_utils.py. It is relevant where the function is reachable through a remote-facing workflow and processes input that an attacker can influence. The description does not specify whether authentication is required or what deployment settings expose the affected path.

The issue affects the CodeAction component in eosphoros-ai DB-GPT, in the execute_code function in code_utils.py. It is relevant where the function is reachable through a remote-facing workflow and processes input that an attacker can influence. The description does not specify whether authentication is required or what deployment settings expose the affected path.

Exploit preconditions

  • Attack surface: A remotely reachable workflow that invokes CodeAction's execute_code function
  • Required access: The description does not establish whether authentication or a particular account is required
  • Trigger point: Attacker-influenced input is processed by the affected function
  • Why exploitation is possible: Input may be handled in a way that permits code injection
  • Attack surface: A remotely reachable workflow that invokes CodeAction's execute_code function
  • Required access: The description does not establish whether authentication or a particular account is required
  • Trigger point: Attacker-influenced input is processed by the affected function
  • Why exploitation is possible: Input may be handled in a way that permits code injection

Why this happens

The flaw is categorized as CWE-94: Improper Control of Generation of Code ('Code Injection'), with CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component also associated. At a high level, the vulnerable pattern is allowing input to influence code that is later interpreted or executed without adequate separation between data and executable instructions.

The flaw is categorized as CWE-94: Improper Control of Generation of Code ('Code Injection'), with CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component also associated. At a high level, the vulnerable pattern is allowing input to influence code that is later interpreted or executed without adequate separation between data and executable instructions.

Potential impact

  • An attacker may execute code with the privileges of the DB-GPT process.
  • The application or its accessible data could be compromised.
  • Depending on deployment permissions and network access, an attacker could potentially affect connected services or systems.
  • An attacker may execute code with the privileges of the DB-GPT process.
  • The application or its accessible data could be compromised.
  • Depending on deployment permissions and network access, an attacker could potentially affect connected services or systems.

General mitigation guidance

Defensive patterns focus on preventing untrusted input from becoming executable code:

  • Prefer fixed, allowlisted operations over dynamically generated or evaluated code.
  • Keep user-controlled values as data, using structured interfaces and safe parameterization.
  • Apply strict validation at trust boundaries and avoid relying on filtering alone.
  • Restrict access to workflows that invoke code execution, and run the application with least privilege.
  • Isolate execution environments and limit their filesystem, network, and credential access where feasible.

Defensive patterns focus on preventing untrusted input from becoming executable code:

  • Prefer fixed, allowlisted operations over dynamically generated or evaluated code.
  • Keep user-controlled values as data, using structured interfaces and safe parameterization.
  • Apply strict validation at trust boundaries and avoid relying on filtering alone.
  • Restrict access to workflows that invoke code execution, and run the application with least privilege.
  • Isolate execution environments and limit their filesystem, network, and credential access where feasible.

How teams detect issues like this

  • Use static analysis to identify dynamic evaluation, shell invocation, or code-generation paths that consume external input.
  • Review CodeAction call chains to establish whether remote inputs can reach execute_code and whether authentication or authorization checks apply.
  • Use code review checks for unsafe handling of input at interpreter or execution boundaries.
  • Enforce policies that restrict dynamic code execution and require security review for changes to these paths.
  • Monitor application and runtime events for unexpected execution behavior, while avoiding assumptions that logs alone will identify every attempt.
  • Use static analysis to identify dynamic evaluation, shell invocation, or code-generation paths that consume external input.
  • Review CodeAction call chains to establish whether remote inputs can reach execute_code and whether authentication or authorization checks apply.
  • Use code review checks for unsafe handling of input at interpreter or execution boundaries.
  • Enforce policies that restrict dynamic code execution and require security review for changes to these paths.
  • Monitor application and runtime events for unexpected execution behavior, while avoiding assumptions that logs alone will identify every attempt.

Sources

SourceLink
github.comgithub.com/eosphoros-ai/DB-GPT/
github.comgithub.com/eosphoros-ai/DB-GPT/issues/3287
github.comgithub.com/ybyu-ieu/agent-security-advisories/blob/main/dbgpt/dbgpt-codeaction-native-subprocess-llm-code-execution.md
vuldb.comvuldb.com/cve/CVE-2026-123018
vuldb.comvuldb.com/submit/1033094
vuldb.comvuldb.com/vuln/431392
vuldb.comvuldb.com/vuln/431392/cti

Frequently asked

questions

The issue is described as remotely triggerable. Exploitation depends on whether a remote-facing workflow can reach the affected function with attacker-influenced input.

The available description does not say whether authentication is required. Deployment access controls and the affected workflow determine the practical requirements.

Avoid dynamically interpreting attacker-influenced content as code. Prefer fixed operations and structured, non-executable inputs.

Treat external input as data, review all paths into execution functions, restrict execution privileges, and enforce checks for unsafe dynamic evaluation in development workflows.

The issue is described as remotely triggerable. Exploitation depends on whether a remote-facing workflow can reach the affected function with attacker-influenced input.

The available description does not say whether authentication is required. Deployment access controls and the affected workflow determine the practical requirements.

Avoid dynamically interpreting attacker-influenced content as code. Prefer fixed operations and structured, non-executable inputs.

Treat external input as data, review all paths into execution functions, restrict execution privileges, and enforce checks for unsafe dynamic evaluation in development workflows.

Find out what's already
exploitable in your codebase.