CVE-2026-38991

Authenticated File Rename Allows PHP Execution in Cockpit CMS

Published Apr 29, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
Description
Cockpit 2.13.5 and earlier is affected by a misconfiguration within the Bucket component _isFileTypeAllowed function where a specially crafted filename bypasses an extension filter. This allows an authenticated attacker to rename arbitrary files with the .php file extension enabling arbitrary code to be executed on the underlying server.

Analysis

AI-generated

Technical impact

A flaw in Cockpit’s Bucket component allows an authenticated attacker to rename arbitrary files with a specially crafted file name that bypasses the component’s extension filter. The renaming can add a .php extension, causing the server to execute the file and granting the attacker arbitrary code execution on the underlying system. This weakness results from improper input validation during filename handling. The impact includes potential compromise of confidentiality, integrity, and availability of the affected installation. The likely attack vector is an authenticated session with file‑management privileges; the CVE description does not state that attackers can upload files, only rename existing ones.

Affected Systems

Any installation of Cockpit CMS version 2.13.5 or earlier is impacted. The issue originates in the Bucket module, which is part of the core component of Cockpit. End‑users who operate or host such instances should review their configuration for possible exploitation.

Risk and Exploitability

Because the flaw requires authentication, an attacker must have valid credentials. Once authenticated, the attacker can rename any file to a .php extension, causing the server to execute the file and granting full server privileges. The CVSS score is 8.8 and the EPSS score is <1%, indicating a low but nonzero likelihood of exploitation. The vulnerability is not listed in the CISA KEV catalog, and no official workaround is published. The likely attack vector is an authenticated session with file‑management privileges, providing potential for lateral movement and persistence after code execution.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Cockpit CMS to version 2.14.0 or later, where the Bucket component enforces strict file‑extension checks and disallows arbitrary renaming of files to .php
  • Restrict file‑upload and rename capabilities to privileged users only, and enforce least‑privilege permissions on user accounts that access the CMS
  • Configure the web server to deny execution of PHP files in the upload directory, preventing accidental or malicious PHP execution

Generated by OpenCVE AI on May 2, 2026 at 00:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-j2rx-4jg9-79mw Cockpit Vulnerable to Unrestricted Upload of File with Dangerous Type
History
Type Values Removed Values Added
Title Authenticated File Rename Allows PHP Execution in Cockpit CMS
Type Values Removed Values Added
Title Arbitrary PHP File Rename Enabling Server‑Side Code Execution in Cockpit CMS
Weaknesses CWE-20
CWE-73
Type Values Removed Values Added
Title Arbitrary PHP File Rename Enabling Server‑Side Code Execution in Cockpit CMS
Weaknesses CWE-20
CWE-73
Type Values Removed Values Added
Weaknesses CWE-434
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Cockpit-hq
Cockpit-hq cockpit
Vendors & Products Cockpit-hq
Cockpit-hq cockpit
Type Values Removed Values Added
Description Cockpit 2.13.5 and earlier is affected by a misconfiguration within the Bucket component _isFileTypeAllowed function where a specially crafted filename bypasses an extension filter. This allows an authenticated attacker to rename arbitrary files with the .php file extension enabling arbitrary code to be executed on the underlying server.
References
Weaknesses
  • CWE-434

    Unrestricted Upload of File with Dangerous Type

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Apr 29, 2026, 8:23 PM
Reserved
Apr 6, 2026, 12:00 AM
Status
Deferred
Published
Apr 29, 2026, 4:16 PM
Modified
Jun 17, 2026, 10:41 AM