/

CVE-2026-45230

Severity:

CRITICAL RISK

(9.1)

Path Traversal in DumbAssets delete-file Endpoint

CVE-2026-45230

Deferred

Vulnerability type

Category:

Path Traversal / Directory Traversal

CWE:

CWE-22

Impact:

Arbitrary File Deletion leading to Denial of Service

Severity:

CRITICAL RISK

(9.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

DumbAssets up to version 1.0.11 contains a path traversal vulnerability in the POST /api/delete-file endpoint that allows unauthenticated users to delete arbitrary files on the server by abusing the filesToDelete array with ../ sequences.

When authentication remains in its default disabled state and path validation is inadequate, attackers can target files outside the intended asset directory, potentially removing critical application files and causing a complete denial of service.

Affected context

This vulnerability manifests in deployments of DumbAssets (through 1.0.11) where the /api/delete-file HTTP endpoint is reachable from untrusted networks and the optional authentication is left disabled (the default state).

The problem appears in environments where the backend uses filesystem paths derived from user-controlled input (the filesToDelete array) and enforces directory boundaries using only superficial checks, rather than canonical path resolution and strict allowlists.

Any server process running with permissions to delete application files, logs, or configuration data can be affected.

Exploit preconditions

  • Attack surface: Public or internal HTTP interface exposing POST /api/delete-file.
  • Required access: Network access to the service; no authentication is required if default settings are used and auth is not enabled.
  • Input vector: The filesToDelete array parameter in the request body, where attackers can inject sequences such as "../" to manipulate filesystem paths.
  • Trigger point: The server-side handler that builds filesystem paths from filesToDelete entries and performs deletion operations.
  • Why exploitation is possible: The implementation relies on incomplete or purely string-based directory checks, allowing traversal outside the intended base directory when processing user-supplied paths.

Why this happens

The root cause aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

The delete-file logic accepts filenames or paths from the filesToDelete array and concatenates them with a base directory or otherwise interprets them as file system locations, without robust canonicalization and enforcement that resolved paths remain within a designated safe directory.

By including traversal sequences (e.g., "../"), an attacker can cause the resolved path to point outside the intended asset directory.

Because the application then executes delete operations on these computed paths with the privileges of the server process, arbitrary files that the process can access may be removed.

Potential impact

  • Deletion of core application files (e.g., server.js) leading to immediate or eventual application crash.
  • Removal of package.json or other metadata, breaking dependency management or application startup.
  • Deletion of configuration files, causing misconfiguration or failure on restart.
  • Removal of log files, complicating incident response and forensic analysis.
  • Broad denial of service if key binaries, scripts, or assets are removed from the deployment environment.
  • Potential violation of data integrity guarantees by removing business-critical documents or asset files.

General mitigation guidance

Effective mitigation focuses on both hardening the file handling logic and tightening access to sensitive functionality:

  • Treat all user-controlled path segments as untrusted and resolve them using canonicalization functions, verifying that the final resolved path remains under a strict, predefined base directory.
  • Replace blacklist-style protection (e.g., just stripping "../") with whitelist-based checks: only delete files that are known, enumerated assets or match a constrained set of patterns in a controlled directory tree.
  • Decouple user input from raw filesystem operations; consider maintaining a mapping or identifier-based reference to allowable files rather than passing actual paths from the client.
  • Enforce strong authentication and authorization for any file deletion endpoints; require at least authenticated administrative roles for destructive operations.
  • Apply least-privilege to the server process so it can only delete files in specific directories and not in broader system or application areas.
  • Introduce defense-in-depth controls such as filesystem permissions, containerization, or read-only deployments for critical code and configuration, making destructive operations harder even if logic flaws exist.

How teams detect issues like this

Detection typically involves both code-centric review and runtime monitoring:

  • Static analysis and code review:
  • Search for endpoints or controllers that invoke filesystem deletion APIs (e.g., unlink, rm, fs.unlink) using user-provided path components.
  • Flag any patterns where request parameters (particularly arrays like filesToDelete) are concatenated with directory strings without canonicalization and directory boundary checks.
  • Review any custom path sanitization utilities to ensure they normalize paths and compare real paths against allowed directories.
  • Configuration and policy checks:
  • Enforce policies that destructive file operations must not be exposed to unauthenticated users and must require explicit authorization.
  • Integrate security linters or SAST tools that can detect directory traversal patterns and improper path handling.
  • Runtime monitoring:
  • Log and alert on unusual file deletion patterns, such as removal attempts targeting parent directories or critical application files.
  • Instrument the delete-file endpoint to capture metadata about requested deletions (without logging sensitive content) and to block or flag requests containing traversal sequences.

Sources

SourceLink
github.comgithub.com/DumbWareio/DumbAssets/pull/136
vulncheck.comvulncheck.com/advisories/dumbassets-path-traversal-file-deletion-via-api-delete-file

Frequently asked

questions

Yes. If the /api/delete-file endpoint is exposed over the network and authentication is left disabled (the default), a remote attacker with network access to the service can exploit this vulnerability by sending crafted HTTP requests.

Not necessarily. The authentication control is optional and disabled by default, so in many deployments attackers would not need any credentials. If authentication is explicitly enabled and correctly enforced, exploitation would require an attacker to obtain or abuse valid credentials with access to the delete-file endpoint.

The safest approach is to strictly separate user input from filesystem paths: canonicalize all paths, verify that the resolved path stays within a predefined base directory, and only allow deletion of known or enumerated files. Additionally, protect the endpoint with strong authentication and authorization so only trusted, privileged users can trigger deletions.

Establish a secure coding standard for file handling that forbids direct use of user-supplied paths, requires canonical path checks against allowlisted directories, and mandates authorization for destructive operations. Combine these policies with automated static analysis, code review checklists focused on filesystem access, and least-privilege deployment practices so that even if a logic flaw slips through, its impact is limited.

Find out what's already
exploitable in your codebase.