Skip to content
CSRF Disclosed report Beginner

CSRF in AppSearch allows creation of "curations"

The AppSearch curations creation endpoint accepts GET requests, so it lacks CSRF protection. An attacker could trick a logged-in user into creating unwanted curations, potentially many or with offensive content.

dee-see Follow

Originally disclosed on HackerOne

Medium 4.3 View original
  • Triaged in 2 days
  • Fixed in 4 months
  • Paid in 12 days
  • Disclosed after 9 months

Summary by the researcher

The bug itself is boring, but I found it with Semgrep and that could be a bit more interesting to you! Details in https://blog.deesee.xyz/code-review/static-analysis/2022/10/16/semgrep-quick-rule-workflow.html

The report

Summary

Hello team! The curations creation for AppSearch engines can happen on a GET request which means there's no CSRF protection.

Steps to reproduce

  1. In one tab visit this page on my Elastic Cloud instance: https://h1repro.kb.eu-west-1.aws.found.io:9243/app/enterprise_search/app_search/engines/national-parks-demo/curations (choose "Login with Elasticsearch", username h1repro / password &Xb|MzZeB@<\)
  2. For a simple demonstration, in another tab you can simply visit https://h1repro.kb.eu-west-1.aws.found.io:9243/internal/app_search/engines/national-parks-demo/curations/find_or_create?query=QUERY_YOU_WANT_TO_CREATE_HERE

If you want a "real" CSRF PoC you can simply host an HTML file with the following content. Obviously a real attack wouldn't let you choose your payload and submit and this would be done automatically :)

HTML
<html>
	<head></head>
	<body>
		<form action="https://h1repro.kb.eu-west-1.aws.found.io:9243/internal/app_search/engines/national-parks-demo/curations/find_or_create" method="get">
			<label for="query">Enter the curation you want to create: </label>
			<input type="text" name="query" id="query" required>
			<input type="submit">
		</form>
	</body>
</html>

Impact

Creation of undesired "curations". Annoying attacks would either create a large quantity of them or it would create queries with foul language.

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

An attacker could create undesired curations, potentially many or with offensive language, but the impact is limited to annoyance.

What the attacker needed

Victim is logged in; victim visits attacker-controlled page

How it was found

  1. Log in to the Elastic Cloud instance and navigate to the AppSearch curations page for an engine.
  2. In another tab, visit the find_or_create URL with a query parameter to create a curation.
  3. Optionally, host an HTML form that submits a GET request to the same endpoint to demonstrate CSRF.

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.

CSRF (Cross-Site Request Forgery) is when a malicious website makes your browser send a request to another site where you are logged in, without your knowledge. Here, the action that creates a 'curation' (a search result tweak) can be triggered by simply loading a link or image, because it uses a GET request instead of a POST with a secret token. So an attacker could make you create unwanted curations just by visiting their page.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by dee-see

View all

9 more disclosed reports, best first.

More from Elastic

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.