Skip to content

OpenList (frontend) allows XSS Attacks in the built-in Markdown Viewer

Moderate severity GitHub Reviewed Published Jun 18, 2025 in OpenListTeam/OpenList • Updated Jun 18, 2025

Package

npm @openlist-frontend/openlist-frontend (npm)

Affected versions

<= 4.0.0-rc.3

Patched versions

4.0.0-rc.4

Description

XSS via .py file containing script tag interpreted as HTML

Summary

A vulnerability exists in the file preview/browsing feature of the application, where files with a .py extension that contain JavaScript code wrapped in <script> tags may be interpreted and executed as HTML in certain modes. This leads to a stored XSS vulnerability.

Affected Versions

  • <= 4.0.0-rc.3

PoC

Create a .py file with arbitrary JavaScript content wrapped in <script> tags. For example:

<script>alert(document.cookie);</script>

When a victim views the file in browsing mode (e.g., a rendered preview), the JavaScript is executed in the browser context.


Attack vector

An attacker can place such a .py file in the system via remote channels, such as:

  • Convincing a webmaster to download or upload the file;
  • Tricking users into accessing a file link via public URLs.

Required permissions

  • None, if public or visitor access is enabled.
  • If the file is uploaded by a user with elevated permissions, potential privilege boundaries may be crossed.

User interaction

Yes. The user must manually click to switch to the browsing or preview mode to trigger the script. And seems only when using ISO-8859-1 encoding.

Scope

  • Unchanged (S:U) - The attack does not cross system or privilege boundaries in general.
  • ⚠️ Controversial edge case: If sensitive preview files are accessible due to misconfiguration, scope could be considered Changed (S:C).

Impact

  • Confidentiality: User information including cookies, login state, and localStorage may be accessed. Some files that only can be viewed via this user will leak too.
  • Integrity & Availability: Not directly impacted.

Recommendations

  • Treat all previewed file types (including non-HTML like .py) as plain text unless explicitly sanitized.
  • Disable rendering modes that can interpret user-uploaded content as HTML.

Timeline

Date Event
2025-06-17 Vulnerability reported
2025-06-17 Comminuty Manager confirmed
2025-06-17 Fixed

Credits

References

@jyxjjj jyxjjj published to OpenListTeam/OpenList Jun 18, 2025
Published to the GitHub Advisory Database Jun 18, 2025
Reviewed Jun 18, 2025
Last updated Jun 18, 2025

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
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
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:N/UI:R/S:U/C:H/I:N/A:N

EPSS score

Weaknesses

CVE ID

CVE-2025-50183

GHSA ID

GHSA-2hw3-h8qx-hqqp

Source code

Credits

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