CVE-2026-38991: Cockpit Package Vulnerable to Unrestricted File Upload Leading to Code Execution
Summary
CVE-2026-38991: Cockpit Vulnerable to Unrestricted Upload of File with Dangerous Type. Affects cockpit-hq/cockpit versions < 2.14.0. Fixed in 2.14.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Cockpit is an open-source server management interface that provides a user-friendly web-based interface for managing servers. It allows users to perform various administrative tasks, monitor system performance, and manage services. However, versions 2.13.5 and earlier have a critical vulnerability that can be exploited by authenticated users to upload malicious files.
Vulnerability Detail
The vulnerability arises from a misconfiguration in the Bucket component's _isFileTypeAllowed function, which fails to properly validate file extensions. An attacker can craft a filename that bypasses the extension filter, allowing them to upload files with a .php extension. This can lead to arbitrary code execution on the server, posing a significant security risk.
How To Fix
Minimum fixed version
2.14.0
This is the first release that contains the fix.
composer require cockpit-hq/cockpit:2.14.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can restrict file uploads by implementing additional server-side checks to validate file types before processing uploads. This can be done by checking the MIME type and ensuring that only specific file types are allowed.
Conclusion
The vulnerability identified as CVE-2026-38991 poses a serious risk to users of the Cockpit package, allowing for unrestricted file uploads that can lead to code execution. It is crucial to update to version 2.14.0 or later to mitigate this risk. Additionally, utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for cockpit-hq/cockpit →
FAQ
CVE-2026-38991 is a vulnerability in the Cockpit package that allows authenticated users to upload files with dangerous extensions, potentially leading to arbitrary code execution.
Cockpit versions 2.13.5 and earlier are affected by this vulnerability.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The CVSS score for this vulnerability is 8.8, indicating a high severity level.
If you cannot update the package right away, implement server-side checks to restrict file uploads as a temporary measure.
Related vulnerabilities
Recent vulnerabilities recorded for cockpit-hq/cockpit.