Skip to content
SSRF Advisory Intermediate CVE-2023-49795CVE-2023-50731CVE-2023-49796

GHSL-2023-182_GHSL-2023-184: Server-side request forgery (SSRF), arbitrary file write and limited file write vulnerabilities in mindsdb/mindsdb - CVE-2023-49795, CVE-2023-50731, CVE-2023-49796

The MindsDB file upload endpoint did not validate user-controlled URL, name, and original_file_name parameters, allowing unauthenticated attackers to perform SSRF, write arbitrary files, and write limited files on the server. This could lead to information disclosure and remote code execution.

sylwia-budzynska Follow

Originally disclosed on GitHub Security Lab

Three vulnerabilities that can be exploited by unauthenticated users were found in MindsDB: a Server-side request forgery (SSRF) vulnerability, an arbitrary file write vulnerability and a limited file write vulnerability.

sylwia-budzynska, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

Impact

This could lead to information disclosure and arbitrary file write, potentially enabling remote code execution.

What the attacker needed

MindsDB instance accessible over network; no authentication required

The fix

The vulnerabilities were fixed in later versions; users should upgrade to the latest version.

How it was found

  1. Start a simple HTTP server serving a test file.
  2. Start MindsDB.
  3. Send a PUT request to /api/files/foobar with a JSON body containing a source URL pointing to the test server.
  4. For arbitrary file write, send a PUT request with a name containing path traversal sequences.
  5. For limited file write, send a PUT request with an original_file_name containing path traversal sequences.

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.

MindsDB lets users upload files by giving a web address. The code did not check that the address was safe, so an attacker could make the server fetch internal resources. It also did not check the file name, so an attacker could write files anywhere on the server.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More by sylwia-budzynska

View all

27 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.