In eosphoros-ai/db-gpt v0.6.0, the web API endpoint POST /api/v1/editor/sql/run does not implement any access control, allowing unauthenticated users to execute arbitrary SQL queries. When using DuckDB as the backend, this can be leveraged to perform arbitrary file writes on the server's filesystem, which may be further exploited to achieve remote code execution.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
POST /api/v1/editor/sql/run endpoint. Ensure that only authenticated and authorized users can execute SQL queries via the API. Apply principle of least privilege to the database and file system access.2 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos.
This repository is a small standalone Python exploit for CVE-2025-51458 affecting DB-GPT <= 0.7.0. It contains only two files: a README describing the vulnerability and usage, and exp.py, the actual exploit. The script uses the requests library and exposes a CLI for unauthenticated interaction with DB-GPT editor APIs. Core capability: the exploit sends attacker-controlled SQL to DB-GPT’s exposed editor endpoints, primarily /api/v1/editor/sql/run and optionally /api/v1/editor/chart/run. It also queries /api/v1/editor/db/list to enumerate available database connections. The exploit is pre-auth and intended for arbitrary SQL execution against backend databases configured in DB-GPT. Main functions in exp.py: - sql_run(): POSTs JSON containing db_name and sql to /api/v1/editor/sql/run and parses returned columns/values. - chart_run(): POSTs SQL to /api/v1/editor/chart/run, though the main CLI flow does not meaningfully use this helper beyond defining it. - list_databases(): GETs /api/v1/editor/db/list to enumerate accessible DB connections. - detect_db_type(): fingerprints backend DB type by issuing SELECT VERSION(), SELECT version(), and SELECT sqlite_version(). - main(): implements CLI modes for listing DBs, executing arbitrary SQL, dumping table names, dumping schema, and interactive SQL. Operational features: - --list-dbs enumerates configured databases. - --sql executes arbitrary user-supplied SQL. - --dump-tables enumerates table names using DB-specific metadata queries. - --dump-db dumps schema details using information_schema or SQLite PRAGMA queries. - Interactive mode provides a simple SQL shell. - --duckdb-bypass rewrites SELECT to SEL/**/ECT to evade the documented DuckDB blacklist. The exploit does not deliver OS-level code execution by itself; its payload is SQL-only. However, it provides practical post-exploitation value by enabling unauthenticated database reconnaissance and data access through the vulnerable web API. The code is functional and operational, but not framework-based or heavily weaponized.
Repository contains a single Python PoC (dbgpt_poc.py), a README, and requirements.txt. The PoC targets DBGPT instances with exposed/unauthenticated API endpoints. Core capabilities: - Phase 1 (Information Disclosure): Sends unauthenticated GET requests to known datasource listing endpoints (/api/v2/serve/datasources, /api/v1/chat/db/list, and sometimes /api/v1/editor/db/list). If the JSON response indicates success, it parses returned datasource objects and extracts sensitive fields such as db name, type, host, port, username, and cleartext password. - Phase 2 (Unauthenticated SQL Execution): Uses a discovered db_name (or user-provided --db) and submits attacker-controlled SQL (via --sql) to SQL/chart execution endpoints (documented in README: /api/v1/editor/chart/run, /api/v1/sql/exec, /api/v1/editor/db/run). The script includes DB-type-aware query selection (e.g., MySQL/Postgres/SQLite/Oracle/MSSQL) to run a suitable default version query when the user leaves the default. Operational features: - Accepts target URL (-u/--url), SQL string (--sql), optional database name (--db), and a --curl mode to print an equivalent cURL command instead of executing. - Disables TLS verification warnings and uses requests with verify=False, indicating it is intended for quick testing against HTTPS targets with self-signed certs. Overall purpose: an operational PoC to (1) verify unauthenticated leakage of DBGPT datasource credentials and (2) leverage that information (or a guessed db_name) to execute arbitrary SQL against the configured backend database through DBGPT’s API.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.