DB-GPT vulnerable to Cross-Site Request Forgery
The DB-GPT server uses an overly permissive CORS configuration that allows any origin. An attacker could exploit this to make cross-site requests to any endpoint, even if the instance is not publicly exposed.
eosphoros-ai/DB-GPT
Originally disclosed on huntr
In version 0.6.0 of eosphoros-ai/db-gpt, the uvicorn app created by dbgpt_server uses an overly permissive instance of CORSMiddleware which sets the Access-Control-Allow-Origin to * for all requests. This configuration makes all endpoints exposed by the server vulnerable to Cross-Site Request Forgery (CSRF). An attacker can exploit this vulnerability to interact with any endpoints of the instance, even if the instance is not publicly exposed to the network.
From the GitHub Advisory Database (GHSA-3248-f932-c76p, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the CORS middleware was configured with a wildcard origin, allowing any website to make requests.
Impact
An attacker could interact with any endpoint of the instance, even if it is not publicly exposed.
What the attacker needed
Victim visits a malicious page; DB-GPT server reachable from victim's browser
The fix
The CORS middleware should be configured to allow only trusted origins instead of a wildcard.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
CORS is a browser rule that controls which websites can talk to a server. Here the server says any website is allowed, so a malicious page could send requests to the DB-GPT server on the victim's behalf. This is called cross-site request forgery.
What is CORS?
A permissive cross-origin policy lets another site read responses with the user's credentials.