Skip to content
SQL injection Disclosed report Advanced

[www.zomato.com] Abusing LocalParams (city) to Inject SOLR query

The city parameter in a search API was passed unsanitised into a Solr query, allowing an attacker to inject Solr local parameters. This could let an attacker modify or view all data in the Solr cluster, or potentially achieve remote code execution.

zzzhacker13 Follow

Originally disclosed on HackerOne

Bounty$100incl. $100 bonus Low View original
  • Triaged in under an hour
  • Fixed in 11 days
  • Paid in 11 days
  • Disclosed after 4 months

Hi Team! ;)

I Found an limited SOLR Injection by Abusing LocalParams (city) in /webapi/searchapi.php, Therefore Please respect my decision to mark this report as Medium instead of High (Based on the fact the code is Vulnerable even if it's hard to exploit).

  • Request (adding single Backslash):
HTTP
GET /webapi/searchapi.php?city=51\ HTTP/1.1
Host: www.zomato.com
Connection: close
Accept: application/json
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/80.0.3987.149 Safari/537.36
Accept-Encoding: gzip, deflate
Accept-Language: en
  • Response:
HTTP
HTTP/1.1 500 Internal Server Error
  • Request (adding double Backslashes):
HTTP
GET /webapi/searchapi.php?city=51\\ HTTP/1.1
Host: www.zomato.com
Connection: close
Accept: application/json
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/80.0.3987.149 Safari/537.36
Accept-Encoding: gzip, deflate
Accept-Language: en
  • Response:
HTTP
HTTP/1.1 200 OK

As you can see - adding single Backslash \ will break the SOLR query but by adding double Backslashes \\ (closing it) will execute the SOLR query properly, Therefore this isn't an "Exception" - it's a valid SOLR Injection!!

Impact

"By exploiting 'Solr (local) Parameters Injection,' it is possible to at least modify or view all the data within the Solr cluster, or even exploit known vulnerabilities to achieve remote code execution."

  • Source: "https://www.veracode.com/blog/security-news/new-research-apache-solr-parameter-injection"

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

Root cause

Likely the city parameter was concatenated into a Solr query without escaping or validation, allowing Solr local parameters to be injected.

Impact

By exploiting the injection, an attacker could at least modify or view all data within the Solr cluster, or even exploit known vulnerabilities to achieve remote code execution; the report notes the injection is limited and hard to exploit.

What the attacker needed

None

How it was found

  1. Send a request to the search API with the city parameter set to a value ending in a single backslash.
  2. Observe that the server returns a 500 Internal Server Error.
  3. Send the same request with the city parameter ending in two backslashes.
  4. Observe that the server returns a 200 OK 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.

Solr is a search engine that many websites use to find and return results. The report shows that a value taken from the URL was placed directly into a Solr query without cleaning it, so special characters could change the query. The author only demonstrated that a single backslash caused an error while two backslashes did not, which suggests the input reaches the query, but full exploitation was not shown.

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 zzzhacker13

View all

4 more disclosed reports, best first.

More from Eternal

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.