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

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: 4b0a00483046022100c07d4f72a86061dd8a8fdf55a15c0216d34797ed9687a20a76db1db880e0fe6c022100f9a245e6e5a4214b52013a7e8d28837ded3d42e976defe08f32afeaf5bbba51c:922c64590222798bb761d5b6d8e72950