Skip to content
Access control Disclosed report Intermediate

SELECT ... INTO OUTFILE does not enforce the FILE WRITE privilege unprivileged arbitrary file write on the server

The SELECT ... INTO OUTFILE command did not enforce the FILE WRITE privilege, so any authenticated user, even one with only USAGE privileges, could write arbitrary files to the aggregator host at any path as the engine OS user. This was an authorization bypass (CWE-862) affecting default-configuration self-managed deployments.

bisht-ji Follow

Originally disclosed on HackerOne

  • Triaged in 28 days
  • Fixed in 40 days
  • Disclosed after 40 days

Summary by the program

A security researcher reported a privilege escalation vulnerability in SingleStore's self-managed database server where the SELECT...INTO OUTFILE command did not properly enforce the FILE WRITE privilege. This authorization bypass (CWE-862) allowed any authenticated user, including those with only USAGE privileges, to write arbitrary files to the aggregator host at any path, written as the engine OS user. The vulnerability affected default-configuration self-managed deployments, though SingleStore Helios was not impacted due to the local_file_system_access_restricted setting. Customers running affected versions could mitigate this issue by enabling the local_file_system_access_restricted configuration flag if not done already. SingleStore has patched this issue and the fix will be reflected in the next patch versions of supported SingleStoreDB releases.

The original report as published on HackerOne, by bisht-ji. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Any authenticated user, including one with only USAGE privileges, could write arbitrary files at any path on the aggregator host as the engine OS user; Helios was not impacted because of the local_file_system_access_restricted setting.

What the attacker needed

Authenticated database user; self-managed deployment; default configuration

The fix

SingleStore patched the issue, and affected self-managed customers could also mitigate by enabling the local_file_system_access_restricted configuration flag.

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.

A database has different permission levels for different users. One permission, FILE WRITE, is meant to control who can save files onto the server's disk. The bug meant the database checked whether you were logged in but not whether you had that permission, so even a low-privilege user could create or overwrite files anywhere the database process could reach.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from SingleStore

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.