PHPMailer Vulnerability

Post non-phpwcms related topics here - but I don't want to see "hey check this or that other cms". Post if you have a point or worthwhile comment, don't post just to increase you post count!
Post Reply
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

PHPMailer Vulnerability

Post by Peekay »

Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

Post by Peekay »

If the above advisory is relevent, you should open:

include/inc_ext/phpmailer/class.phpmailer.php

and replace:

Code: Select all

function SendmailSend($header, $body) {
        if ($this->Sender != "")
        $sendmail = sprintf("%s -oi -f %s -t", $this->Sendmail, $this->Sender);
        else
        $sendmail = sprintf("%s -oi -t", $this->Sendmail);
with:

Code: Select all

function SendmailSend($header, $body) {
         if ($this->Sender != "") {
         $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
         } else {
         $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail));
         }
1996 328ti
Posts: 317
Joined: Mon 19. Apr 2004, 06:10
Location: Greenville, SC USA
Contact:

Post by 1996 328ti »

Just an FYI.
Two of my sites on different servers have been spewing out emails.
My host believes it was because of phpmailer.
I have deleted it entirely since I don't use it.
Hopefully it won't cause any problems.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Post by update »

This is fixed in trunk 20-08-2007 (don't know about previous versions)
claus
Post Reply