/

CVE-2026-26202

Severity:

HIGH RISK

(7.5)

Arbitrary File Read / Path Traversal in Penpot

CVE-2026-26202

Analyzed

Vulnerability type

Category:

Arbitrary File Read / Path Traversal

CWE:

CWE-22, CWE-73

Impact:

Unauthorized File Disclosure and Sensitive Data Exposure

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Penpot includes an arbitrary file read vulnerability where an authenticated user can coerce the backend into reading local files by supplying a filesystem path as font data to the create-font-variant RPC endpoint.

When exploited, the contents of sensitive files on the server are ingested and stored as "font" assets, allowing attackers with team edit permissions to access system files, secrets, and credentials reachable by the Penpot process.

Affected context

This vulnerability affects Penpot server deployments where:

  • The create-font-variant RPC endpoint is exposed and usable by authenticated users.
  • Application users can upload or define custom font data as part of design collaboration features.
  • The backend runs with permissions to read local files on the host or container filesystem.

The issue arises when the backend treats font data chunks as paths to local files without properly constraining or validating them, allowing users with team edit permissions to target arbitrary readable paths such as configuration files, credential stores, and other sensitive resources.

Exploit preconditions

  • Attack surface: Application-layer RPC endpoint (create-font-variant) exposed by the Penpot backend.
  • Required access: Valid authenticated account with team edit permissions or similar rights to create or modify font assets.
  • Trigger point: Submission of a crafted font variant request where a local filesystem path (e.g., /etc/passwd or a configuration file path) is supplied as the font data chunk.
  • Why exploitation is possible: The backend logic accepts user-controlled input and uses it to read from the server's local filesystem without sufficiently constraining allowed locations or enforcing strict separation between uploaded data and local file access.

Why this happens

The core issue is improper restriction of user-supplied paths used in file operations, aligning with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') and CWE-73: External Control of File Name or Path.

Instead of treating font data purely as opaque, untrusted content, the implementation allows that input to influence which local file is opened and read. Without filtering or confining paths to a safe directory, attackers can reference arbitrary readable files. This design breaks the assumption that authenticated users can only access assets they uploaded or are explicitly authorized to use and instead grants them indirect read access to backend-local files.

Potential impact

  • Exposure of sensitive system files (e.g., user account information, service configuration).
  • Disclosure of application secrets, API keys, and cryptographic material stored on disk.
  • Access to database connection strings and credentials, potentially enabling database compromise.
  • Leakage of environment variables and mounted secrets in containerized deployments.
  • Facilitation of further attacks such as privilege escalation, lateral movement, or full server compromise using harvested secrets.

General mitigation guidance

Effective mitigation focuses on separating user-controlled data from backend file access and strictly constraining any local file operations:

  • Design font upload and management flows so that the backend only processes raw uploaded data and never interprets user input as a local file path.
  • When local resources must be referenced, use fixed identifiers mapped to a closed, server-side registry of allowed files rather than accepting arbitrary paths.
  • Enforce strict path normalization and allowlisting, ensuring file access is confined to dedicated asset directories and cannot escape through .. segments or absolute paths.
  • Run the Penpot backend under a minimally privileged service account, with access only to the directories required for application operation.
  • In containerized environments, avoid mounting sensitive host paths into the application container and minimize the secrets present on the filesystem.

How teams detect issues like this

Detection can combine code-level analysis with runtime monitoring:

  • Static analysis and code review:
  • Search for file reading APIs that consume parameters derived from RPC or HTTP request payloads.
  • Flag patterns where user input is passed directly into file path constructors without allowlists or directory confinement.
  • Review asset-handling and upload flows (e.g., fonts, media) to ensure they never treat user fields as local paths.
  • Runtime and operational monitoring:
  • Log accesses to sensitive filesystem locations and correlate them with font or asset creation operations.
  • Monitor for unusual patterns where many different system files are read through the font creation endpoint.
  • Policy enforcement:
  • Apply secure coding guidelines that prohibit direct use of untrusted data in file path operations.
  • Integrate automated scanning tools into CI/CD to detect path traversal and external file path control patterns.

Sources

SourceLink
github.comgithub.com/penpot/penpot/commit/06e5825c8a0209889966a4eb5152efd6ff108626
github.comgithub.com/penpot/penpot/security/advisories/GHSA-xp3f-g8rq-9px2

Frequently asked

questions

It is highly exploitable in environments where users with team edit permissions are untrusted or where accounts can be compromised. Since the flaw is triggered via a normal application workflow, exploitation does not require complex payloads once authentication is obtained.

No. The attacker needs an authenticated account with team edit permissions or equivalent rights that allow creating or modifying font variants. Full administrative access is not required as long as the vulnerable RPC endpoint is reachable.

The safest approach is to redesign the font processing logic so that user input is treated only as uploaded content, never as a local filesystem path. If the backend must access local files, it should do so using internal identifiers mapped to a strict allowlist of known-safe locations.

Implement a clear rule that untrusted input must not control file paths, and enforce this through code review, static analysis, and secure design practices. Constrain all file access to specific directories, use allowlists or indirection for any resource references, and run services with minimal filesystem privileges to limit the impact of any future mistakes.

Find out what's already
exploitable in your codebase.