CVE-2026-137682 in DB-GPT
Summary
by MITRE • 11/27/2026
A vulnerability was determined in eosphoros-ai DB-GPT up to 0.8.2. The affected element is the function editor_sql_run of the file packages/dbgpt-app/src/dbgpt_app/openapi/api_v1/editor/api_editor_v1.py. This manipulation of the argument db_name causes improper access controls. The attack is possible to be carried out remotely. The exploit has been publicly disclosed and may be utilized. The pull request to fix this issue awaits acceptance.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 11/27/2026
The vulnerability identified in eosphoros-ai DB-GPT versions up to 0.8.2 represents a critical security flaw rooted in improper access control mechanisms within the application's API layer. Specifically, the defect resides in the editor_sql_run function located at packages/dbgpt-app/src/dbgpt_app/openapi/api_v1/editor/api_editor_v1.py. This component is responsible for handling SQL execution requests initiated through the web-based interface or API endpoints provided by DB-GPT. The core issue arises from how the db_name argument is processed during these operations, leading to a failure in enforcing appropriate authorization checks before allowing database interactions.
This flaw allows an attacker with network access to manipulate the db_name parameter to bypass intended restrictions on which databases can be queried or modified. Because the application fails to validate whether the requesting user has legitimate permissions for the specified target database, it effectively grants unauthorized users the ability to execute SQL commands against protected data stores. This misconfiguration transforms what should be a controlled administrative function into an open vector for data exfiltration, modification, or destruction depending on the underlying database privileges assigned to the service account running DB-GPT.
The operational impact of this vulnerability is severe due to its remote exploitability and public disclosure status. Attackers can leverage known techniques to craft malicious requests that target specific databases without authentication barriers being properly enforced in all contexts. Since the exploit has been publicly disclosed, automated scanning tools and threat actors are likely already attempting to identify vulnerable instances on the internet. The consequences range from sensitive data exposure through SELECT statements to potential system compromise if dangerous SQL constructs like UNION-based injection or stored procedure execution are possible within the specific database engine being targeted by DB-GPT.
From a classification perspective, this issue aligns with CWE-269 Improper Privilege Management and CWE-862 Missing Authorization. In terms of adversary tactics, it facilitates actions consistent with ATT&CK technique T1059 Command and Scripting Interpreter via SQL commands, allowing attackers to interact directly with backend data systems using standard database query languages as a vehicle for exploitation. The lack of strict input validation on the db_name parameter exemplifies how insufficient abstraction between user-supplied values and internal system identifiers can lead to privilege escalation scenarios even within application-level logic rather than operating system or network layers.
Mitigation strategies must prioritize immediate remediation given the public availability of exploits. Organizations running DB-GPT should upgrade to a patched version as soon as the pending pull request is merged and released by the eosphoros-ai maintainers. In the interim, if upgrading is not immediately feasible, administrators should restrict network access to the DB-GPT interface using firewall rules or reverse proxy configurations that limit exposure to trusted IP ranges only. Additionally implementing Web Application Firewall (WAF) rules can help detect and block malformed SQL payloads attempting to exploit this specific parameter manipulation before they reach the application logic.
Long-term resolution requires a review of the authentication and authorization middleware integrated with DB-GPT's OpenAPI endpoints. Developers should ensure that every API call, particularly those involving database operations, undergoes rigorous verification against user session tokens or role-based access control lists prior to processing any arguments like db_name. Implementing least-privilege principles for the underlying database accounts used by DB-GPT will also limit the blast radius in case similar vulnerabilities are discovered in future updates. Regular security audits and static code analysis focused on input validation patterns can help prevent recurrence of such improper access control flaws across the application's attack surface.