/

CVE-2026-67449

Severity:

CRITICAL RISK

(9.8)

Path Traversal (CWE-22) in Portabase TUS Upload Handler

CVE-2026-67449

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-306

Impact:

Arbitrary file overwrite and potential compromise of sensitive key material

Severity:

CRITICAL RISK

(9.8)

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

Portabase had a path traversal flaw in its TUS upload webhook handler that could let an unauthenticated attacker overwrite files in the private data directory. Depending on the files affected, this could compromise sensitive key material or disrupt backup and restore operations.

Affected context

The issue affects Portabase versions before 1.21.2, in the TUS upload webhook handler at app/api/tus/hooks/route.ts. It becomes risky when the handler processes upload paths without reliably confining file writes to the intended destination; the private data directory includes the AES-256-GCM master key file.

Exploit preconditions

  • Attack surface: The TUS upload webhook handler must be reachable by the attacker.
  • Required access: The described vulnerability does not require authentication.
  • Trigger point: A request processed by the upload webhook causes a file write.
  • Why exploitation is possible: Path handling permits a write to escape the intended upload location and reach files under the private data directory.

Why this happens

The underlying issue is insufficient validation and confinement of paths used for file writes. When a handler derives a destination from attacker-influenced path information without ensuring the resolved destination stays within an authorized directory, traversal can enable unintended file overwrites. This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory. The lack of an authentication requirement is also relevant to CWE-306: Missing Authentication for Critical Function.

Potential impact

  • An attacker may overwrite files in the private data directory.
  • Sensitive key material, including the master key, could be affected.
  • Backup or restore operations could be disrupted.
  • Data confidentiality or integrity may be affected if dependent files or keys are compromised.

General mitigation guidance

Defensive patterns focus on confining writes and reducing trust in client-supplied path information:

  • Resolve and canonicalize destination paths, then verify they remain within an explicitly allowed directory.
  • Prefer server-generated filenames and fixed storage locations over paths derived from request data.
  • Apply strict validation to upload metadata and reject unexpected path components.
  • Require appropriate authentication and authorization for sensitive upload operations where feasible.
  • Run the service with least privilege and limit write access to only the directories it needs.
  • Keep sensitive key material separate from upload-writable locations and protect it with narrowly scoped access controls.

How teams detect issues like this

  • Use static analysis to identify file-write operations that consume request-controlled paths or filenames.
  • Review upload handlers for canonicalization and explicit checks that resolved paths remain within an approved directory.
  • Monitor for unexpected writes to private data directories and changes to key-material files.
  • Enforce code review or CI policies requiring path confinement, authorization checks, and least-privilege storage access for upload features.
  • Automated security review tools may help identify risky path-handling patterns.

Sources

SourceLink
github.comgithub.com/Portabase/portabase/commit/8dcb406790728fbdbf758ec88bf000af79498fc1
github.comgithub.com/Portabase/portabase/pull/355
github.comgithub.com/Portabase/portabase/releases/tag/1.21.2
github.comgithub.com/Portabase/portabase/security/advisories/GHSA-7697-vf3j-253j

Frequently asked

questions

It can be triggered through the TUS upload webhook if that handler is reachable by an attacker.

The vulnerability is described as unauthenticated, so an account is not required for the affected upload path.

Ensure every file write is confined to an approved directory using resolved-path checks, and avoid using client-controlled paths as destinations.

Use server-generated storage names, validate upload metadata, protect sensitive files with separate access controls, and review upload code for both path confinement and authorization.

Find out what's already
exploitable in your codebase.