Skip to content

Cross-site scripting (XSS) via SVG image upload

Moderate
sriramveeraghanta published GHSA-rcg8-g69v-x23j Jan 6, 2025

Package

No package listed

Affected versions

< 0.23

Patched versions

=> 0.23

Description

Overview

A cross-site scripting (XSS) vulnerability has been identified in Plane versions prior to 0.23. The vulnerability allows authenticated users to upload SVG files containing malicious JavaScript code as profile images, which gets executed in victims' browsers when viewing the profile image.

Affected Services

Product: Plane API Service
Versions: < 0.23
Component: Profile Image Upload Feature
Platform: All platforms where Plane is deployed

Problem Description

The application allows users to upload SVG files as profile images without proper sanitization. SVG files can contain embedded JavaScript code that executes when the image is rendered in a browser. This creates an XSS vulnerability where malicious code can be executed in the context of other users' sessions.

Technical Impact
  • Allows execution of arbitrary JavaScript code in victims' browsers
  • Potential theft of session tokens and sensitive data
  • Ability to perform unauthorized actions on behalf of the victim
  • Possible escalation to more severe attacks through initial JavaScript execution
Attack Vectors
  • Attacker uploads a specially crafted SVG file as their profile image
  • The SVG file contains embedded JavaScript code
  • When other users view the attacker's profile or any page displaying the profile image, the malicious code executes

Proof of Concept

The following SVG content demonstrates the vulnerability:

<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" viewBox="0 0 124 124" fill="none">
<rect width="124" height="124" rx="24" fill="#000000"/>
   <script type="text/javascript">  
      alert(0x539);
   </script>
</svg>

Recommended Actions

  • Upgrade to Plane version 0.23 or later
  • If immediate upgrade is not possible, Configure Content Security Policy (CSP) headers to prevent script execution from uploaded content

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

CVE ID

CVE-2025-21616

Weaknesses

No CWEs

Credits