Async search stores authorization headers in clear text
The .async-search index stored a copy of request authorization headers in clear text. Anyone with access to that index, typically a superuser, could read other users' credentials and potentially impersonate them.
Originally disclosed on HackerOne
- Triaged in 26 hours
- Fixed in 56 days
- Paid in 26 hours
- Disclosed after 56 days
Summary: The .async-search index stores the results of async searches. It also stores a copy of the requests authorization headers, in clear text. These clear text authorization headers are then available to anyone with access to .async-search, probably mostly super users.
Description:
While you have to be a superuser to read this index, there's potential for lateral movement or impersonating other users if credentials are re-used, which would be the case if e.g. LDAP or Active Directory integrations are used.
Kibana is understandably eager in its use of async-search. The default waitForCompletionTimeout is 100ms, so if you want to get the password of someone else on your cluster, then it's probably already there if they use Kibana. If not, send them a link to a Kibana dashboard that trigger searches that take longer than 100ms.
I first noticed this on a recent 8.0.0-snapshot, but 7.10.0 is the latest release containing it.
Steps To Reproduce:
# This just triggers an async-search as yourself.
POST /_async_search?size=0&wait_for_completion_timeout=0
{
"query": {
"match_all": {}
}
}
# This shows where the clear text authorization header is stored
POST /.async-search/_search
{
"_source": "headers.*"
}
Supporting Material/References:
- Video walkthrough
Impact
- Super users can get the clear text credentials of other users.
- An XSS with a superuser victim can now trivially get the authorization headers of its target.
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 async search feature persisted the full request headers, including the Authorization header, into the .async-search index without redacting or encrypting them.
Impact
Super users could obtain clear text credentials of other users, and an XSS with a superuser victim could trivially retrieve the target's authorization headers.
What the attacker needed
Superuser access to read .async-search; victim uses Kibana or async search
How it was found
- Trigger an async search as yourself with a zero wait timeout.
- Search the .async-search index and request only the headers fields.
- Observe the clear text authorization header in the stored document.
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.
When you log in to a service, your browser sends a header that proves who you are. This report found that a search feature saved a copy of that proof in a place other administrators could read. If those credentials are reused elsewhere, someone could pretend to be another user.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.