Information disclosure in PHP - #VU6975
Published: June 8, 2017 / Updated: June 9, 2017
Vulnerability details
The vulnerability allows an attacker to gain access to potentially sensitive information.
The vulnerability exists within the implementation of the mail() PHP function in win32/sendmail.c, when parsing email headers for CC and BCC lines. A local or remote attacker with ability to modify email headers can send a copy of email messages to arbitrary email address.
Example:
$headers = implode("\r\n", [
"Cc: test2@example.com",
"X-Test-Cc: line 2",
"X-Test-Aabbcc: test3@example.com",
"X-Line-4: line 4"
]);
mail("test@example.com", "Subject", "Body", $headers);
Actual recipients:
Recipients: test@example.com, test2@example.com, test3@example.com