{"exploit":{"id":"EDB-2136","name":"Barracuda Spam Firewall 3.3.03.053 - Remote Code Execution (RCE) (1)","description":"Barracuda Spam Firewall 3.3.03.053 - Remote Code Execution (RCE) (1)","cves":["CVE-2006-4081"],"author":"Greg Sinclair","published":"2006-08-07","platform":"hardware","type":"remote","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/2136","path":"exploits/hardware/remote/2136.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-2136.txt","vulnerabilities":[{"id":"CVE-2006-4081","state":"PUBLISHED","title":null,"titleSource":null,"description":"preview_email.cgi in Barracuda Spam Firewall (BSF) 3.3.01.001 through 3.3.03.053 allows remote attackers to execute commands via shell metacharacters (\"|\" pipe symbol) in the file parameter. NOTE: the attack can be extended to arbitrary commands by the presence of CVE-2006-4000.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2006-4081","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2006-4081"},"updatedAt":"2024-08-07T18:57:44.859Z","retrievedAt":"2026-11-26T13:05:56.183Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-2136.png?v=2","url":"https://exploitbin.com/exploits/EDB-2136","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-2136/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-2136/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"Title: Barracuda Arbitrary File Disclosure + Command Execution\nSeverity: High (Sensitive Information Disclosure)\nDate: 01 August 2006\nVersion Affected: Barracuda Spam Firewall version 3.3.01.001 to 3.3.03.053\nDiscovered by: Greg Sinclair (gssincla@nnlsoftware.com)\n\nDiscovered on: 29 May 2006\n\nOverview:\nBarracuda Spam Firewalls (www.barracudanetworks.com) are vulnerable to\narbitrary file disclosure due to improper parameter sanitation.\n\n\nDetails:\nThe Barracuda Spam Firewalls from version 3.3.01.001 to 3.3.02.053 are vulnerable to\narbitrary file disclosure via the preview_email.cgi script. The /cgi-\nbin/preview_email.cgi script is designed to retrieve a message from the local\nmessage database on the Barracuda Spam Firewall. However, the \"file\" parameter which\nis passed via GET is not properly sanitized to restrict the file retrieval to the\nmessage database directories. The script looks for \"/mail/mlog\" in the file\nparameter but does not take into account directory transversal arguments such as\n\"..\" The result is that any file that is accessible to the web server user is\naccessible from the web interface. The script does require a valid user to be logged\nin to perform this attack, however using the \"Barracuda Hardcoded Password\nVulnerability\" (NNL-20060801-01) guest password vulnerability this restriction can\neasily be overcome. This particular problem is amplified by the fact that it is\npossible to download the full configuration file for the barracuda. The\nconfiguration file is periodically backed-up into the /tmp directory as\n\"/tmp/backup/periodic_config.txt.tmp\" Message confidentiality is compromised by the\nfact that an attacker who is able to view the message log screen (which can be done\nvia the guest password vulnerability) can easily view any message on the system.\nThe message logs are stored as /mail/mlog/X/Y/email_address/msgID where X is the\nfirst character of email_address, Y is the second character of email_address,\nemail_address is the recipient's email address and msgID is the message ID assigned\nto the message in question. So for example if jon@smith.com received a message with\nmessageID 1234, any user could view the message by entering\n/mail/mlog/j/o/jon@smith.com/1234\n\nProof of Concept:\n\nhttps://<deviceIP>/cgi-bin/preview_email.cgi?file=/mail/mlog/../tmp/backup/periodic_config.txt.tmp\n\nCommand Execution by Matthew Hall <lists[at]ecsc.co.uk>\n\nhttps://<deviceIP>/cgi-bin/preview_email.cgi?file=/mail/mlog/../../bin/ls%20/|\n\nRecommendations:\n* Never allow your barracuda web interface to be accessible from untrusted networks (especially the Internet)\n* Upgrade to version 3.3.0.54 or later\n\nVendor Contact:\n30 May 2006   - Initial Vendor Contact\n24 June 2006  - Vendor replies with prospect of fix\n17 July 2006  - NNL request status update, no reply\n01 Aug 2006   - NNL releases vuln report, notifies vendor of release\n\n# milw0rm.com [2006-08-07]","sha256":"2c3886089e92227ea16f641081ef917f461763463cbcccc6f61adb2107741983","bytes":2901,"fetchedAt":"2026-11-26T13:05:51.986Z","encoding":"utf-8 (display only; download retains original bytes)"}