id: lucee-unset-credentials

info:
  name: Lucee - Unset Credentials
  author: jpg0mez
  severity: high
  description: |
    The Lucee admin panel has a first-time setup page which allows any user to set the administrator password.
  reference:
    - https://luceeserver.atlassian.net/browse/LDEV-926
    - https://www.petefreitag.com/blog/lucee-admin-password-box/
  classification:
    cwe-id: CWE-798
  metadata:
    verified: true
    max-request: 2
    shodan-query: "html:\"Lucee\""
    fofa-query: "app=\"Lucee-Engine\""
  tags: lucee,default-login,unauth,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/lucee/admin/web.cfm"
      - "{{BaseURL}}/lucee/admin/server.cfm"

    stop-at-first-match: true
    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'Lucee'
          - 'box">New Password</div>'
        condition: and

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