Stored XSS in Preview title in omeka/omeka-s


Reported on

Jul 24th 2023


There is accumulated XSS in the preview title of the page.

Proof of Concept

Step 1. Log in to the administrator screen and create a new page.
Step 2. Insert "Browse preview" from "Add new block" and specify Payload in "Preview title". Step 3. When you access the preview screen in the saved state, the embedded script (alert) will be executed.


<img src=x onerror=alert(document.domain)>




POST /admin/site/s/test/page/test HTTP/1.1


PoC Video


Stored XSS vulnerabilities can lead to data theft, account compromise, and the distribution of malware.
Attackers can inject malicious scripts into a website, allowing them to steal sensitive information or hijack user sessions.
Additionally, stored XSS can result in website defacement and content manipulation, causing reputational damage.
It can also be used as a platform for launching phishing attacks, tricking users into revealing their credentials or sensitive data.


Properly sanitize inserted strings.

We are processing your report and will contact the omeka/omeka-s team within 24 hours. 7 months ago
morioka12 modified the report
7 months ago
morioka12 modified the report
7 months ago
We have contacted a member of the omeka/omeka-s team and are waiting to hear back 7 months ago
John Flatness
7 months ago

So, there's a setting for sanitizing user input in HTML contexts like this: Settings -> Security -> Use HTMLPurifier. I assume you have that setting disabled?

morioka12 modified the report
7 months ago
7 months ago


Sorry, I made a mistake in reporting the vulnerability. I have revised the report again, so please check it.

John Flatness validated this vulnerability 7 months ago
scgajge12 has been awarded the disclosure bounty
The fix bounty is now up for grabs
The researcher's credibility has increased: +7
John Flatness marked this as fixed in 4.0.2 with commit c6833c 7 months ago
The fix bounty has been dropped
This vulnerability has now been published 7 months ago
browse-preview.phtml#L9 has been validated
to join this conversation