/

CVE-2026-104478

Severity:

HIGH RISK

(7.1)

Path Traversal (CWE-22) in Formwork BackupController

CVE-2026-104478

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read and File Deletion

Severity:

HIGH RISK

(7.1)

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

A path traversal vulnerability in Formwork's BackupController allows authenticated panel users with backup permissions to access files outside the intended backup directory. Depending on the granted permission, an attacker may download or delete arbitrary files by supplying a crafted traversal path.

Affected context

The vulnerability occurs in Formwork deployments where the BackupController processes user-controlled backup paths for download or deletion. It becomes risky when an authenticated panel user has the corresponding backup permission and path validation relies on PHP basename behavior that does not adequately normalize backslash-separated traversal sequences on Linux.

Exploit preconditions

  • Attack surface: Authenticated administrative or panel backup functionality
  • Required access: A valid panel account with backup download or deletion permission
  • Trigger point: Backup file retrieval or deletion through the BackupController
  • Why exploitation is possible: User-supplied paths are insufficiently constrained to the backup directory, and backslash-separated traversal input can bypass the relevant basename-based protection on Linux

Why this happens

The underlying bug is improper restriction of user-controlled file paths. The application attempts to sanitize a requested path with a filename-oriented operation, but that control does not reliably canonicalize or reject alternate path separators and traversal components on the target platform. This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, because attacker-influenced paths can escape the directory boundary intended by the application.

Potential impact

  • An attacker may read sensitive files available to the application process
  • An attacker could delete application data, backups, or configuration files
  • Exposure of credentials or secrets may enable further compromise
  • Service availability could be affected by deletion of required files
  • The application or host may experience broader compromise depending on file permissions

General mitigation guidance

Mitigation generally focuses on enforcing directory boundaries through canonical path handling rather than relying on filename stripping alone.

Common defensive patterns include:

  • Resolve and validate candidate paths against a fixed, trusted backup directory
  • Reject traversal components and both platform-specific path separators
  • Prefer server-generated backup identifiers over user-controlled filesystem paths
  • Apply separate, least-privilege authorization checks for backup download and deletion
  • Restrict the application process from reading or deleting unrelated sensitive files
  • Use controlled storage APIs that expose only explicitly registered backup objects

These measures reduce reliance on input formatting and limit the consequences of path validation failures.

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis rules for file APIs receiving request parameters or decoded input
  • Code review checks for basename-only sanitization and missing canonical-path containment tests
  • Tests covering forward slashes, backslashes, encoded separators, traversal components, and mixed path formats
  • Runtime monitoring for unusual backup download or deletion requests and access to files outside approved storage
  • Authorization policy reviews that verify backup permissions are narrowly assigned

Automated security review tools may help flag user-controlled paths reaching filesystem operations, but findings should be validated against deployment-specific path behavior.

Sources

SourceLink
github.comgithub.com/getformwork/formwork
github.comgithub.com/getformwork/formwork/commit/89e7821a6fcee89474cd401b3dde0c1dccb0687f
vulncheck.comvulncheck.com/advisories/formwork-before-2.3.13-path-traversal-via-backupcontroller-download-and-delete

Frequently asked

questions

It can be exercised through the Formwork panel, but exploitation requires an authenticated user with the relevant backup permission and access to the affected functionality.

Not necessarily. The important prerequisite is authorization to download or delete backups; accounts without those permissions may not reach the vulnerable operations.

Resolve requested paths against a trusted backup directory and allow the operation only when the canonical result remains within that directory. Prefer opaque, server-controlled backup identifiers over raw paths.

Combine canonical path containment checks, rejection of all relevant traversal encodings and separators, least-privilege file permissions, focused authorization, and tests for platform-specific path handling.

Find out what's already
exploitable in your codebase.