
Proof-of-concept exploit for CVE-2024-54160 demonstrating stored XSS and HTML injection in OpenSearch Reports plugin via malicious iframe payload in header/footer fields.
It was found that the Opensearch plugin called "reports" was vulnerable to HTML-injection in version 2.18.0. The report functionality allowed users to store HTML in the header and footer while creating a new report definition. Below is a quick proof of concept where I stored an iframe in the header functionality that fetched a JavaScript keylogger from my local machine which recorded the keys typed by the user.
:8000/keylogger.html">
This is remediated in Opensearch version 2.19, where the data passed in the footer/header functionality are sanitized with DOMpurify.
Release notes https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.19.0.md
Version 2.17.9. was also found to be vulnerable for stored Cross-Site Scripting in the same functionality (footer/header).
This is also fixed in version 2.19.0.