/

CVE-2025-69981

Severity:

CRITICAL RISK

(9.8)

Unrestricted File Upload in FUXA upload Endpoint

CVE-2025-69981

Modified

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-434

Impact:

Remote Code Execution and Authentication Bypass

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

FUXA v1.2.7 exposes an unauthenticated file upload endpoint at /api/upload that accepts arbitrary files without validation.

A remote attacker can upload or overwrite critical files, including the SQLite user database to gain administrative access, or upload executable scripts that may lead to arbitrary code execution on the server.

Affected context

The vulnerability occurs in FUXA v1.2.7 deployments where the /api/upload HTTP API endpoint is reachable from untrusted networks and is configured without additional reverse-proxy protections.

In this context, the upload handler accepts incoming files without authentication, type checks, or safe storage controls, allowing attacker-supplied content to be written into the server's filesystem.

Systems that store critical assets (such as the SQLite user database or executable scripts) in writable locations accessible by the upload mechanism are particularly exposed.

Exploit preconditions

  • Attack surface: Publicly exposed /api/upload endpoint over HTTP/HTTPS.
  • Required access: None; exploitation can be performed by an unauthenticated remote attacker.
  • Trigger point: Sending a crafted HTTP request that uploads a file via /api/upload.
  • Why exploitation is possible:
  • No authentication or authorization checks on the upload endpoint.
  • Lack of validation on file type, size, or intended destination.
  • Ability of the upload mechanism to write into locations where critical data or executable content is stored.

Why this happens

This issue stems from implementing a generic file upload API that trusts client input and omits both access control and file handling constraints.

Mapped to CWE-434: Unrestricted Upload of File with Dangerous Type, the bug class involves accepting arbitrary files without verifying their type, content, or storage location, and then placing them in directories where they can overwrite sensitive data or be interpreted as executable code.

In this case, the /api/upload handler allows direct writes to the filesystem, enabling overwrites of the SQLite user database and the placement of scripts in paths that may be executed by the application runtime or underlying platform.

Potential impact

  • Attackers may gain administrative access by overwriting the SQLite user database or related authentication data.
  • Attackers could achieve remote code execution by uploading scripts or binaries that are interpreted or executed by the server.
  • Persistent backdoors may be installed via uploaded web shells, scripts, or modified configuration files.
  • Integrity of project data, configuration, and logs can be compromised through arbitrary file overwrites.
  • Lateral movement within the hosting environment may be possible if the application runs with elevated privileges or broad filesystem access.

General mitigation guidance

Mitigation typically focuses on tightening both access control and file handling policy around upload functionality:

  • Require strong authentication and appropriate authorization for all file upload endpoints.
  • Enforce strict allowlists for file types, using server-side validation based on content (MIME/type inspection) rather than extension alone.
  • Store uploaded files outside of web-accessible or executable paths, and segregate them from configuration, database, and code directories.
  • Normalize and strictly validate file names and paths to prevent path traversal or overwriting of sensitive files.
  • Apply least-privilege file system permissions so that the application process cannot modify authentication databases, executables, or configuration files.
  • Introduce size limits, quotas, and logging for upload actions to reduce abuse potential and improve auditability.

How teams detect issues like this

High-level detection approaches often include:

  • Static analysis: Flagging controllers or route handlers that accept multipart/form-data or file streams without authentication/authorization checks or type validation.
  • Code review: Looking for:
  • Upload endpoints that directly write to the filesystem.
  • Usage of user-controlled file names or paths for write operations.
  • Lack of allowlisted MIME/type checks and absence of storage segregation for uploaded files.
  • Runtime monitoring: Logging all upload requests, including source IP, authenticated user (if any), file names, sizes, and resulting storage paths; alerting on suspicious patterns like uploads of executable file types or repeated overwrites.
  • Policy enforcement: Using WAF or API gateways to restrict access to upload endpoints, enforce authentication, limit methods, and block clearly unsafe content types.

Sources

SourceLink
github.comgithub.com/frangoteam/FUXA/blob/master/server/api/projects/index.js#L193

Frequently asked

questions

Yes. The /api/upload endpoint is exploitable remotely, and because it lacks authentication, an attacker does not need valid credentials to upload arbitrary files.

Only network access to the affected FUXA instance is required. If the service is reachable over HTTP/HTTPS from the attacker's location, the vulnerability can be exploited without prior access or an existing account.

Protect file upload endpoints with strict authentication and authorization, validate and constrain uploaded file types, and ensure that uploaded data is stored in non-executable, segregated locations where it cannot overwrite critical system or authentication files.

Adopt a secure upload design pattern: mandate access control for all uploads, use explicit allowlists and content-based validation, segregate storage, apply least-privilege filesystem permissions, and integrate automated checks (static analysis and code review guidelines) to flag any new upload functionality that deviates from these rules.

Find out what's already
exploitable in your codebase.