/

CVE-2026-54352

Severity:

CRITICAL RISK

(9.6)

Symlink Path Traversal (CWE-22) in Budibase PWA Zip

CVE-2026-54352

Analyzed

Vulnerability type

Category:

Path Traversal via Symlink

CWE:

CWE-22, CWE-59

Impact:

Arbitrary File Read / Sensitive Data Exposure

Severity:

CRITICAL RISK

(9.6)

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

Budibase's PWA zip processing pipeline allows workspace builders to upload a crafted archive whose symlinked icon paths are followed and read by the server.

Because symbolic links are preserved and validated only against resolved paths, an attacker can cause the server to stream arbitrary readable files into MinIO and retrieve them via the asset endpoint.

Affected context

The vulnerability occurs in Budibase deployments where the PWA zip upload endpoint (POST /api/pwa/process-zip) is accessible to workspace builders and uses extract-zip@2.0.1 to unpack user-provided archives.

It manifests when uploaded zips contain symbolic link entries that point to files outside the intended temporary directory, and the subsequent icon validation and streaming logic relies on resolved filesystem paths without explicitly rejecting symlinks.

In these conditions, the server process can inadvertently expose any file it is permitted to read through the asset-serving API.

Exploit preconditions

  • Attack surface: HTTP API endpoint POST /api/pwa/process-zip used for PWA asset uploads.
  • Required access: Ability to authenticate as a workspace-level builder or any role permitted to upload PWA zips.
  • Trigger point: Submission of a crafted zip containing symlinked icon paths, followed by retrieval of the generated asset via GET /api/assets/{appId}/pwa/{uuid}.png.
  • Why exploitation is possible: The unzip library preserves absolute symlink targets, and the server-side validation uses path resolution and existence checks that follow symlinks without enforcing a strict directory boundary. Later, the object store reads from the resolved path, streaming whatever file the symlink targets.

Why this happens

The underlying bug is a classic path traversal via symbolic links (CWE-22, CWE-59) in the file handling pipeline for uploaded archives.

The server relies on path.resolve, string-prefix checks (startsWith), and fs.existsSync to validate icon sources, which only verify the resolved path string and existence, not whether the path is a symlink or points outside the intended base directory.

Because extract-zip restores symlinks as-is and fsp.open follows them, the code effectively trusts user-controlled archive structure to dictate what filesystem locations are read, allowing adversaries to traverse out of the temp directory and access arbitrary readable files.

Potential impact

  • Workspace builders may read configuration files containing secrets or API keys the server can access.
  • Attackers could obtain database connection strings, credentials, or tokens from environment-specific files.
  • Sensitive application logs and user data stored on disk can be exposed.
  • Exposure of system files may aid further exploitation, reconnaissance, or privilege escalation.

General mitigation guidance

Effective mitigation centers on enforcing strict filesystem boundaries and treating archive contents as untrusted.

Common defensive patterns include:

  • Rejecting or stripping symbolic link entries when processing user-supplied archives.
  • Performing canonical path checks after resolution and explicitly verifying that targets remain within an allowed base directory, even when symlinks are followed.
  • Using dedicated safe-unzip or sandboxed file extraction utilities that do not preserve unsafe links or paths.
  • Isolating file-processing logic in a minimally privileged context where the process can only read a constrained set of directories.
  • Designing object storage ingestion routines to operate on in-memory buffers or vetted temporary copies rather than arbitrary filesystem paths.

How teams detect issues like this

Teams can identify similar vulnerabilities by:

  • Running static analysis or custom linting rules that flag reliance on path.resolve, startsWith checks, and fs.existsSync or fsp.open over user-controlled paths without explicit symlink handling.
  • Reviewing code paths that process uploaded archives or file trees, particularly where a library may preserve symlink metadata.
  • Establishing security code review checklists for file I/O, verifying that canonical path enforcement and symlink rejection are in place.
  • Employing automated SAST tools and CI policies that detect path traversal patterns and risky use of filesystem APIs.

Sources

SourceLink
github.comgithub.com/Budibase/budibase/security/advisories/GHSA-w7mq-r738-x278

Frequently asked

questions

No, it primarily enables arbitrary file reads. However, accessing sensitive configuration or credentials can lead to secondary compromise or escalation.

The attacker must be able to authenticate as a workspace-level builder or any role permitted to upload PWA zip packages to the affected endpoint.

The safest pattern is to treat all archive contents as untrusted, strip or reject symlink entries, and enforce canonical path checks that guarantee all file operations remain within a tightly scoped directory. Additionally, run the file-processing code under least privilege.

Adopt secure file-handling guidelines: avoid following untrusted symlinks, validate resolved paths against an allowlisted base directory, use hardened libraries for archive extraction, and include path traversal checks in code review and automated analysis pipelines.

Find out what's already
exploitable in your codebase.