Skip to content
SQL injection Disclosed report Intermediate CVE-2021-43608

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.

nickvergessen Follow

Originally disclosed on HackerOne

High 8.5 View original
  • 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:

  1. REPORT /remote.php/dav/comments/files/1985
  2. XML input oc:filter-comments.oc:limit#text was set to 1'"
  3. 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

The original report as published on HackerOne, by nickvergessen. 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

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

  1. Send a request to the comments endpoint under the remote DAV path.
  2. Set the comment filter limit field to a malformed value.
  3. 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.

More by nickvergessen

View all

10 more disclosed reports, best first.

More from Nextcloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.