Skip to main content
Vulnerability Database/CVE-2026-105694

CVE-2026-105694: Penpot SVG Upload XSS Vulnerability

CVE-2026-105694 is a cross-site scripting flaw in Penpot that allows authenticated users to inject malicious scripts via SVG uploads. This article covers the technical details, affected versions, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-105694 Overview

Penpot, an open-source design and prototyping platform, contains a stored cross-site scripting (XSS) vulnerability [CWE-79] in versions prior to 2.18.0. Authenticated users with file-edit permission can upload Scalable Vector Graphics (SVG) media containing scripts, event-handler attributes, and foreignObject elements. The backend stores these files without sanitization and serves them as image/svg+xml from the Penpot origin. When a victim navigates to the asset URL, attacker-controlled JavaScript executes in the Penpot origin, enabling requests and data access with the victim's session authority. The issue is fixed in version 2.18.0.

Critical Impact

Attackers with file-edit permission can execute arbitrary JavaScript in a victim's browser under the Penpot origin, hijacking session authority to read or modify design assets and account data.

Affected Products

  • Penpot versions prior to 2.18.0
  • Penpot self-hosted deployments serving user-uploaded SVG media
  • Penpot cloud instances with multi-user file-edit permissions

Discovery Timeline

  • 2026-10-05 - CVE-2026-105694 published to the National Vulnerability Database (NVD)
  • 2026-10-05 - Last updated in NVD database

Technical Details for CVE-2026-105694

Vulnerability Analysis

The vulnerability stems from Penpot's media upload pipeline accepting SVG files without stripping active content. SVG is an XML-based image format that supports embedded <script> elements, inline event-handler attributes such as onload and onclick, and <foreignObject> elements that can contain arbitrary HTML and JavaScript. Penpot stored uploaded SVG media verbatim and served it from the same origin as the application using the image/svg+xml content type. Browsers execute JavaScript embedded in SVG files when they are rendered directly as documents. Because the content is served from the Penpot origin, scripts run with full access to the victim's session cookies and application APIs.

Root Cause

The backend media handlers in app.media.local and app.media.remote did not pass uploaded SVG content through a sanitizer before persisting it to storage. The pre-patch code relied on raw XML parsing without filtering dangerous elements or attributes. Any authenticated user holding file-edit permission could introduce malicious SVG payloads into shared project assets.

Attack Vector

An attacker with file-edit permission crafts an SVG containing an embedded script or event handler, uploads it as media to a Penpot file, and shares the resulting asset URL with a victim. When the victim loads the URL, the browser renders the SVG as a document and executes the embedded JavaScript under https://<penpot-origin>. The script can then issue authenticated requests to Penpot APIs, exfiltrate project data, or modify assets on the victim's behalf. User interaction is required because the victim must navigate to the asset URL.

text
// Patch excerpt: backend/src/app/media/local.clj
 (ns app.media.local
   "Local media processing via ImageMagick and FontForge shell commands."
   (:require
    [app.common.exceptions :as ex]
    [app.common.logging :as l]
    [app.common.media :as cm]
    [app.common.schema :as sm]
    [app.common.time :as ct]
    [app.config :as cf]
+   [app.media.svg :as svg]
    [app.media.validation :as validation]
    [app.storage.tmp :as tmp]
    [app.util.shell :as shell]
    ...))

// Patch excerpt: backend/src/app/media/remote.clj
    [app.http.client :as http]
-   [app.media.local :as local]
+   [app.media.svg :as svg]
    [app.media.validation :as validation]

Source: GitHub Commit c4dd043. The patch introduces an app.media.svg namespace that both local and remote media handlers now invoke to sanitize uploaded SVG content before storage.

Detection Methods for CVE-2026-105694

Indicators of Compromise

  • SVG files stored in Penpot media storage that contain <script> tags, on* event-handler attributes, or <foreignObject> elements.
  • Access-log entries showing direct GET requests to image/svg+xml asset URLs followed by anomalous authenticated API calls from the same session.
  • Unexpected outbound requests from browser sessions after rendering a Penpot media asset.

Detection Strategies

  • Scan existing media storage for SVG files containing scriptable constructs using an XML or HTML parser that enumerates script, foreignObject, and on* attributes.
  • Review Penpot audit logs for media upload events by users with file-edit permission in the days preceding patch deployment.
  • Correlate asset URL retrievals with subsequent high-privilege API activity under the same session token.

Monitoring Recommendations

  • Enable Content Security Policy (CSP) violation reporting at the Penpot origin to surface unexpected inline script execution.
  • Monitor web proxy and endpoint telemetry for browser sessions requesting image/svg+xml resources immediately before Penpot API bursts.
  • Alert on new SVG uploads from accounts that do not typically contribute design media.

How to Mitigate CVE-2026-105694

Immediate Actions Required

  • Upgrade all Penpot instances to version 2.18.0 or later, which introduces server-side SVG sanitization.
  • Audit existing SVG media for malicious content and remove or re-sanitize affected assets.
  • Review and tighten file-edit permission assignments to reduce the pool of accounts capable of uploading media.

Patch Information

The fix is delivered in Penpot Release 2.18.0. The security change is implemented in GitHub Commit c4dd043 and tracked in Pull Request #10989 and Pull Request #11044. Advisory details are published as GHSA-wrcr-m7p8-m2c4 and GHSA-xg6f-5v5x-g4w2.

Workarounds

  • Serve user-uploaded media from an isolated origin or sandboxed subdomain to contain script execution away from the Penpot session context.
  • Deploy a strict Content Security Policy that disables inline scripts and restricts script sources for asset endpoints.
  • Configure the reverse proxy to force Content-Disposition: attachment on image/svg+xml responses so browsers download rather than render SVG files.
bash
# Example nginx snippet to force SVG downloads as a stop-gap mitigation
location ~* \.svg$ {
    add_header Content-Disposition "attachment";
    add_header Content-Security-Policy "default-src 'none'; script-src 'none'";
    types { image/svg+xml svg; }
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.