header-logo
Suggest Exploit
vendor:
PHP
by:
Not mentioned
7.5
CVSS
HIGH
Email Header Injection
93
CWE
Product Name: PHP
Affected Version From: PHP 4 up to and including 4.4.6, PHP 5 up to and including 5.2.1
Affected Version To: Not applicable
Patch Exists: YES
Related CWE: CVE-2007-1719
CPE: a:php:php
Other Scripts:
Platforms Tested:
2007

Email Header Injection Vulnerability in PHP

PHP is prone to an email-header-injection vulnerability because it fails to properly sanitize user-supplied input when constructing email messages. Exploiting this issue allows a malicious user to create arbitrary email headers, and then create and transmit spam messages from the affected computer.

Mitigation:

The vendor has released patches to address this vulnerability. It is recommended to update to the latest version of PHP.
Source

Exploit-DB raw data:

source: https://www.securityfocus.com/bid/23145/info

PHP is prone to an email-header-injection vulnerability because it fails to properly sanitize user-supplied input when constructing email messages.

Exploiting this issue allows a malicious user to create arbitrary email headers, and then create and transmit spam messages from the affected computer.

The following versions are vulnerable:

PHP 4 up to and including 4.4.6
PHP 5 up to and including 5.2.1

<?php
   mail("test@domain(dot)com", "Test\r\n \nAnother-Header: Blub", "Message");
?>