[php-maint] Bug#325550: php4: Problems with mail() function allow relaying through mailforms...

Luc Stroobant debian at stroobant.be
Mon Aug 29 11:58:21 UTC 2005

Package: php4
Version: 4:4.3.10-15
Severity: normal

Last weekend, we noticed some attempts to abuse on of our mailforms.
Analysis of our mail logs showed some mails where sent through a php script.
As the "To" field was hard coded in the script and register_globals was off,
the spammer must have used some other method to send the mail.

A stripped down version of the original script can be found on:

I used mod_security to intercept the POST requests...
Here is one of those requests:


It shows he was able to insert an addition recipient through the "r" variable, which is the reaction field. (and not the from or to, as one would expect)
He used some multi-part boundaries for this. IMHO this is a bug in the PHP mail() function and I'm afraid this kind of abuse can be used on quite a lot PHP mailforms...
I can provide you with addition details and server logs if needed.



-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages php4 depends on:
ii  libapache-mod-php4           4:4.3.10-15 server-side, HTML-embedded scripti
ii  php4-common                  4:4.3.10-15 Common files for packages built fr

-- no debconf information

More information about the pkg-php-maint mailing list