CVE-2026-23499

5.4 MEDIUM

📋 TL;DR

This vulnerability allows authenticated staff users or apps in Saleor e-commerce platform to upload malicious HTML/SVG files containing JavaScript. When these files are served from the same domain as the dashboard without proper restrictions, they can execute scripts in users' browsers, potentially stealing access tokens. Only deployments hosting media files on the same domain as the dashboard are affected.

💻 Affected Systems

Products:
  • Saleor
Versions: 3.0.0 to 3.20.107, 3.21.0 to 3.21.42, 3.22.0 to 3.22.26
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when media files are hosted on same domain as dashboard (e.g., example.com/media/ and example.com/dashboard/). Not vulnerable with separate media domains or Saleor Cloud.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Malicious staff members could steal access/refresh tokens from other staff members, leading to complete account takeover and potential data breaches.

🟠

Likely Case

Authenticated attackers with staff privileges could execute cross-site scripting attacks against other staff users, compromising their sessions.

🟢

If Mitigated

With proper Content-Disposition headers or separate media domains, files download instead of executing, preventing script injection.

🌐 Internet-Facing: MEDIUM - Requires authenticated staff access and specific deployment configuration where media shares dashboard domain.
🏢 Internal Only: MEDIUM - Internal staff users with malicious intent could exploit this against other staff members.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Requires authenticated staff user or app access. Exploitation involves uploading malicious HTML/SVG files and tricking victims to access them.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.20.108, 3.21.43, 3.22.27

Vendor Advisory: https://docs.saleor.io/security/#restricted-file-uploads

Restart Required: Yes

Instructions:

1. Backup your Saleor instance. 2. Update to patched version using pip: 'pip install saleor==3.22.27' (or appropriate version). 3. Apply database migrations if needed. 4. Restart the application server.

🔧 Temporary Workarounds

Configure Content-Disposition Header

all

Set servers hosting media files (CDN/reverse proxy) to return Content-Disposition: attachment header to force file downloads instead of browser rendering.

nginx: add_header Content-Disposition attachment;
Apache: Header set Content-Disposition attachment

Block HTML/SVG File Serving

all

Prevent servers from returning HTML and SVG files from media directories.

nginx: location ~* \.(html|svg)$ { deny all; }
Apache: <FilesMatch "\.(html|svg)$"> Require all denied </FilesMatch>

Implement Content Security Policy

all

Set strict CSP headers for media files to prevent script execution.

add_header Content-Security-Policy "default-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'none';";

🧯 If You Can't Patch

  • Host media files on separate domain/subdomain from dashboard (e.g., media.example.com instead of example.com/media/)
  • Implement all three workarounds simultaneously for defense in depth

🔍 How to Verify

Check if Vulnerable:

Check if Saleor version is between 3.0.0-3.20.107, 3.21.0-3.21.42, or 3.22.0-3.22.26 AND media files are served from same domain as dashboard.

Check Version:

python -c "import saleor; print(saleor.__version__)"

Verify Fix Applied:

Verify version is 3.20.108+, 3.21.43+, or 3.22.27+. Test by uploading HTML file and checking if it downloads with Content-Disposition header instead of rendering.

📡 Detection & Monitoring

Log Indicators:

  • Unusual HTML/SVG file uploads by staff users
  • Multiple file upload attempts with script-like content

Network Indicators:

  • HTML/SVG files served from media endpoints without Content-Disposition headers
  • Cross-origin requests from media to dashboard domains

SIEM Query:

source="saleor" AND (event="file_upload" AND file_extension IN ("html", "svg")) | stats count by user

🔗 References

📤 Share & Export