Skip to content

Sulu: Stored XSS via media download inline-disposition override

Moderate severity GitHub Reviewed Published Jul 20, 2026 in sulu/sulu • Updated Sep 2, 2026

Package

composer sulu/sulu (Composer)

Affected versions

<= 2.6.24
>= 3.0.0-alpha1, < 3.0.8

Patched versions

2.6.25
3.0.8

Description

Impact

Stored Cross Site Scripting (XSS) in the media download endpoint.

The download route (/media/{id}/download/{slug} and its admin variant) accepts the query parameter ?inline=1. When it is present, the response is sent with the header Content-Disposition: inline for any MIME type, which overrides the disposition rules the server would otherwise apply. By default, HTML and other scriptable uploads are not blocked, the file is served on the application origin with its stored Content-Type, and no X-Content-Type-Options or Content-Security-Policy header is sent. Because of this, an attacker can upload an HTML file and build a link that runs their own JavaScript in the context of the Sulu origin.

Every installation where users who are not fully trusted can upload media is affected. This includes editors who hold the media add permission. Such an editor can store a payload that runs in the authenticated session of anyone who opens the link, including an administrator, which allows theft of the session and credentials and lets the attacker act as the victim.

The problem is present on the 2.6 and 3.0 branches and goes back to the introduction of the ?inline override in 2017. It is not the same as CVE-2024-47617, which was a reflected XSS through the slug and is already fixed.

Patches

Fixed in 2.6.25 and 3.0.8. The download route now forces Content-Disposition: attachment for MIME types a browser renders as a document (text/html, application/xhtml+xml, text/xml, application/xml), even when ?inline=1 is requested. Inline viewing is unchanged for safe types such as PDF and images.

Workarounds

Block scriptable uploads by MIME type through sulu_media.upload.blocked_file_types. This stops new uploads only, so existing media has to be reviewed separately.

sulu_media:
    upload:
        blocked_file_types: [text/html, application/xhtml+xml, image/svg+xml, text/xml, application/xml, text/javascript, application/javascript]

At the web server or reverse proxy, force Content-Disposition: attachment and add X-Content-Type-Options: nosniff and a restrictive Content-Security-Policy on the paths /media/*/download/* and /admin/media/*/download/*.

Serve uploaded media from a separate origin that does not share the application cookies.

Restrict the media upload permission to trusted users and keep the default SVG sanitizer enabled.

References

@alexander-schranz alexander-schranz published to sulu/sulu Jul 20, 2026
Published by the National Vulnerability Database Aug 31, 2026
Published to the GitHub Advisory Database Sep 2, 2026
Reviewed Sep 2, 2026
Last updated Sep 2, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(7th percentile)

Weaknesses

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

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. Learn more on MITRE.

CVE ID

CVE-2026-82396

GHSA ID

GHSA-pp4x-ccxq-6r33

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.