It was discovered that Kibana was not sanitizing document fields containing HTML snippets. Using this vulnerability, an attacker with the ability to write documents to an elasticsearch index could inject HTML. When the Discover app highlighted a search term containing the HTML, it would be rendered for the user.
https://www.elastic.co/community/security/
https://discuss.elastic.co/t/elastic-stack-7-14-1-security-update/283077