CVE-2018-25157
Stored XSS in Phraseanet 4.0.3 via Malicious File Uploads
Publication date: 2026-02-11
Last updated on: 2026-02-11
Assigner: VulnCheck
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| phraseanet | phraseanet | to 4.0.7 (exc) |
| phraseanet | phraseanet | 4.1.20 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-79 | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
[{'type': 'paragraph', 'content': "CVE-2018-25157 is a stored cross-site scripting (XSS) vulnerability in Phraseanet versions up to 4.0.3 and 4.0.4-dev. It allows authenticated users to upload files with specially crafted filenames containing malicious SVG scripts. These scripts are stored and executed in the browser when the file is viewed, enabling attackers to run arbitrary code in the context of the victim's browser."}, {'type': 'paragraph', 'content': 'The vulnerability occurs because the application does not properly neutralize input in filenames during document uploads. For example, a filename starting with a double quotation mark followed by an SVG tag with an onload event (e.g., "><svg onload=alert(document.cookie)>.jpg") can trigger script execution.'}, {'type': 'paragraph', 'content': 'This stored XSS can cause persistent effects such as alert popups or redirecting users to other pages when they view the uploaded files.'}] [1, 4]
How can this vulnerability impact me? :
This vulnerability can impact users by allowing attackers to execute malicious scripts in their browsers when they view uploaded files with crafted filenames.
- Attackers can steal cookies, which may lead to session hijacking.
- Users can be redirected to malicious websites without their consent.
- Persistent script execution can disrupt normal user experience, such as causing repeated alert popups.
However, this exploit does not affect Chrome or Chromium-based browsers due to their built-in XSS filtering.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': 'This vulnerability can be detected by checking for uploaded files with crafted filenames containing malicious SVG payloads, especially filenames starting with a double quotation mark followed by an SVG tag with an onload event, such as `"><svg onload=alert(1)>.jpg`.'}, {'type': 'paragraph', 'content': 'To detect potential exploitation, you can search your Phraseanet upload directories or database for filenames matching this pattern.'}, {'type': 'list_item', 'content': 'Use a command like `grep -rE \'"<svg onload=\' /path/to/phraseanet/uploads` to find suspicious filenames in the upload directory.'}, {'type': 'list_item', 'content': 'If filenames are stored in a database, run a query to find filenames containing `<svg onload=` or similar SVG payloads.'}, {'type': 'paragraph', 'content': 'Note that the exploit triggers when the file is viewed in the web interface, causing persistent alert popups or redirects, so monitoring user reports of such behavior can also help detect exploitation.'}] [1, 4]
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation step is to upgrade Phraseanet to version 4.0.7 or later, where this stored cross-site scripting vulnerability has been fixed.
Until the upgrade can be performed, restrict file uploads to trusted users only and implement input validation or sanitization on filenames to prevent SVG payloads.
Additionally, monitor and remove any files with suspicious filenames containing SVG scripts to prevent execution when viewed.
Consider using browser security features or extensions that block or filter XSS attacks, although some browsers like Chrome already have built-in XSS filtering that mitigates this exploit.