in reply to Poison null byte test

I think that version of formmail is safe from poison null byte expoloits. Perl itself doesn't treats null byte specially. It have special meaning only to system libraries so it can be exploited only when you pass filenames with null byte to functions like open.

I've made quick review of that code and I have found only two open calls. Both of them do not use user supplied input for filenames.

Read this Phrack article which describes how poison null byte expoloits work.

Update: On the other hand I see that user supplied data is feed to sendmail as it is without escaping any bad chars (watch for print MAIL lines). It seems it can be used to inject additional mail headers into message. I'm not sure how it can exploited.

Also there are XSS issues. It seems that user input is used to render HTML page without escaping any bad chars. Even if it is true it is unlikely to be exploitable since only user who submits form sees that page. Still it stinks.

--
Ilya Martynov (http://martynov.org/)