id: wp-admin-menu-editor-fpd

info:
  name: Admin Menu Editor - Full Path Disclosure
  author: theamanrawat
  severity: low
  description: |
    Admin Menu Editor WordPress plugin contains a full path disclosure vulnerability due to improper access restrictions in its source files, allowing unauthenticated attackers to retrieve full server paths and aiding exploitation.
  impact: |
    Attackers can obtain server file paths, aiding in further exploitation of the website.
  reference:
    - https://wordpress.org/plugins/admin-menu-editor/
  metadata:
    verified: true
    max-requests: 1
    public-www: "/wp-content/plugins/admin-menu-editor/"
  tags: debug,wordpress,wp,wp-plugin,admin-menu-editor,fpd

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/admin-menu-editor/menu-editor.php"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_all(body, "Fatal error", "undefined function", "wp-content/plugins/admin-menu-editor/menu-editor.php")'
        condition: and

    extractors:
      - type: regex
        name: disclosed-path
        group: 0
        regex:
          - '([A-Za-z]:\\[^\s<>"]+|/[^\s<>"]+)wp-content/plugins/admin-menu-editor/menu-editor\.php'
# digest: 4a0a004730450220065f3366341d1c6eb7121f8e2186bf93d4a18a9dcc7e1eda5dd4f71a9b0dd6ef0221008c270a906a85645790f72509f069f6abdbb296d36c9bea3a0834bc77d638c1b6:922c64590222798bb761d5b6d8e72950