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-zipused 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,startsWithchecks, andfs.existsSyncorfsp.openover 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.

