SQL injextion via vulnerable doctrine/dbal version
A user-facing API passed a user-supplied limit value into a database query without proper handling, so malformed input produced an SQL syntax error. The reporter claims this amounts to a full SQL injection through user-provided input.
Originally disclosed on HackerOne
- Triaged in 25 hours
- Fixed in 5 months
- Disclosed after 6 months
Summary by the program
Advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-539w-xvpg-wj29
The report
Summary:
SQL injection via limit parameter on user facing APIs
Steps To Reproduce:
Run security scanner:
- REPORT /remote.php/dav/comments/files/1985
- XML input oc:filter-comments.oc:limit#text was set to 1'"
- You have an error in your SQL syntax
Supporting Material/References:
For more details see: https://github.com/nextcloud-gmbh/h1/issues/197
Impact
Full flexed SQL injection via user provided input
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
The reporter claims a full SQL injection through user-provided input, though the text only demonstrates a database error rather than data extraction.
What the attacker needed
Access to the comments API
How it was found
- Send a request to the comments endpoint under the remote DAV path.
- Set the comment filter limit field to a malformed value.
- Observe a database syntax error in the response.
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 query is built from text a user sends, and the user's text is not kept separate from the query's instructions. By sending a strange value where a number is expected, the attacker can make the database complain, which is a sign the input reaches the query directly. If it can be shaped further, an attacker might read or change data they should not.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.