/

CVE-2026-72557

Severity:

HIGH RISK

(8.8)

Unrestricted File Upload (CWE-434) in Cockpit CMS Assets

CVE-2026-72557

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

Cockpit CMS 2.6.0 permits authenticated users to upload files with arbitrary extensions through the asset upload endpoint. Because uploaded files may be stored in a web-accessible directory, an attacker could upload a PHP webshell and execute operating-system commands on the server.

Affected context

The vulnerability occurs in Cockpit CMS asset upload functionality when the

allowed_uploads setting permits all file extensions, including server-side

script files. Risk is increased when uploaded assets are stored beneath a

web-accessible directory and the web server is configured to execute uploaded

scripts.

Exploit preconditions

  • Attack surface: The authenticated asset upload endpoint
  • Required access: Any authenticated Cockpit CMS account with upload capability
  • Trigger point: Uploading a file through the asset management workflow
  • Why exploitation is possible: Extension filtering permits executable

server-side scripts, and uploaded files may be directly reachable through the

web server

Why this happens

The underlying bug is unrestricted acceptance of user-controlled files without

enforcing a narrow, security-focused allowlist of permitted types. Treating a

wildcard upload policy as safe allows executable content to enter a web-accessible

location. This maps to CWE-434: Unrestricted Upload of File with Dangerous Type, where the application fails to sufficiently restrict the type or use of

uploaded files.

Potential impact

  • An attacker may execute arbitrary operating-system commands
  • The CMS application or hosting account could be compromised
  • Sensitive files and application data may be accessed or modified
  • Malicious content could be used for persistence or further compromise
  • Other users or systems may be affected through server-side lateral movement

General mitigation guidance

Mitigation generally focuses on reducing trust in uploaded content and ensuring

that user-controlled files cannot become executable server resources.

Common defensive patterns include:

  • Replacing wildcard extension policies with a narrow allowlist based on business needs
  • Validating file type using independent content checks rather than filenames alone
  • Storing uploads outside the web root or serving them through a non-executing download handler
  • Applying server configuration that disables script execution in upload directories
  • Generating controlled filenames and preventing path manipulation
  • Restricting upload permissions and running the application with least privilege
  • Enforcing size, content, and resource limits for uploaded files

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules that identify wildcard upload allowlists and direct file writes
  • Code review checks for user-controlled filenames, extensions, and upload destinations
  • Policy enforcement requiring uploads to use non-executable storage locations
  • Runtime monitoring for script files or unexpected extensions appearing in asset directories
  • Web server and application logs showing uploads followed by requests to newly created files
  • Automated security review tools that flag unrestricted upload and executable-content risks

Sources

SourceLink
github.comgithub.com/Cockpit-HQ/Cockpit

Frequently asked

questions

It can be exploited through the application's asset upload interface when that

endpoint is reachable and the attacker has an account with upload privileges.

Not necessarily. The stated condition is an authenticated account capable of

using the affected upload functionality; the exact required role depends on

deployment-specific authorization settings.

Permit only necessary non-executable file types, validate content, and store

uploads where the web server cannot execute them.

Apply least-privilege upload permissions, use secure-by-default storage and

server policies, monitor uploaded content, and include unrestricted-upload checks

in code review and automated security testing.

Find out what's already
exploitable in your codebase.