/

CVE-2026-77929

Severity:

HIGH RISK

(8.8)

Unrestricted File Upload (CWE-434) in ClipBucket v5

CVE-2026-77929

Deferred

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-434

Impact:

Remote Code Execution

Severity:

HIGH RISK

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

ClipBucket v5 before 5.5.3-#182 contains an unrestricted file upload vulnerability in the photo upload workflow. An authenticated user may upload a server-side script disguised as an image, which could result in remote code execution when the stored file is processed by PHP-FPM.

Affected context

The vulnerability occurs in deployments where authenticated users can access the photo upload endpoint and uploaded files are stored in a location that can be interpreted as executable PHP. The risk is increased when MIME or image validation is performed without ensuring that the final stored filename uses a non-executable extension.

Exploit preconditions

  • Attack surface: Authenticated photo upload functionality
  • Required access: A valid ClipBucket user account with permission to upload photos
  • Trigger point: File handling and storage in the FileUpload::manageFile() workflow
  • Why exploitation is possible: MIME validation can accept content with image-like magic bytes while the attacker-controlled PHP extension remains on disk, allowing the web server or PHP-FPM to interpret the file as executable code

Why this happens

The underlying bug is an insufficient separation between content validation and filename or extension handling. Although the upload is checked as an image, the file-management logic does not reliably replace the attacker-controlled extension after validation. This maps to CWE-434: Unrestricted Upload of File with Dangerous Type, because a user-controlled file can retain a server-executable type and be placed in a location where it may be invoked as application code.

Potential impact

  • An attacker may execute arbitrary code with the privileges of the PHP application
  • The application or underlying host could be compromised
  • Sensitive application data may be accessed or modified
  • Stored content, accounts, or administrative functions could be tampered with
  • The vulnerability could support lateral movement into connected services

General mitigation guidance

Mitigation generally focuses on treating uploaded files as untrusted data and preventing them from becoming executable.

Common defensive patterns include:

  • Allowing only required file types through content-aware validation and strict allowlists
  • Replacing user-controlled filenames and extensions with server-generated, non-executable names
  • Storing uploads outside web-accessible or script-executable directories where possible
  • Configuring web servers and PHP runtimes to deny script execution in upload locations
  • Applying least privilege to the application process and uploaded-file storage
  • Serving uploaded content through controlled download handlers with appropriate content-disposition policies
  • Limiting upload size, rate, and access scope according to business requirements

How teams detect issues like this

Detection can combine code analysis, runtime monitoring, and deployment policy checks.

  • Static analysis can flag upload handlers that preserve user-controlled extensions or move files directly into web-accessible directories.
  • Code review should examine whether validation checks both content and final storage type, and whether validation occurs before any executable interpretation.
  • Web-server and PHP-FPM policies can detect or block script execution from upload paths.
  • Monitoring can alert on executable-looking extensions, unexpected server-side files, or PHP requests under media directories.
  • CI security rules and automated review tools can enforce upload allowlists, generated filenames, and non-executable storage locations.

Sources

SourceLink
github.comgithub.com/MacWarrior/clipbucket-v5/commit/61cce55ab26ef88fb782dfde47b44c17c56978cd
github.comgithub.com/MacWarrior/clipbucket-v5/releases/tag/5.5.3-%23182
vulncheck.comvulncheck.com/advisories/clipbucket-remote-code-execution-via-photo-upload-endpoint

Frequently asked

questions

It may be exploitable through the application's network-accessible photo upload feature when an attacker has the required authenticated account and upload permissions.

The attacker generally needs valid ClipBucket credentials and authorization to use the affected upload endpoint. The required privilege level depends on the application's role configuration.

Treat uploads as untrusted data, generate server-controlled non-executable filenames, store them outside executable web paths, and enforce server-side restrictions that prevent script execution there.

Use strict content and extension allowlists, separate upload storage from application code, apply least privilege, and continuously test upload workflows for executable-file handling flaws.

Find out what's already
exploitable in your codebase.