#VU6975 Information disclosure in PHP


Published: 2017-06-08 | Updated: 2017-06-09

Vulnerability identifier: #VU6975

Vulnerability risk: Low

CVSSv3.1: 2.6 [CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N/E:U/RL:O/RC:C]

CVE-ID: N/A

CWE-ID: CWE-200

Exploitation vector: Local

Exploit availability: No

Vulnerable software:
PHP
Universal components / Libraries / Scripting languages

Vendor: PHP Group

Description

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

Mitigation
Update to version 7.0.20 or 7.1.6.

Vulnerable software versions

PHP: 7.0.0 - 7.0.19, 7.1.0 - 7.1.4


External links
http://bugs.php.net/bug.php?id=74510
http://git.php.net/?p=php-src.git;a=commit;h=20a608d9dae4c758bf608e10fd2cdb9cc1559625


Q & A

Can this vulnerability be exploited remotely?

No. This vulnerability can be exploited locally. The attacker should have authentication credentials and successfully authenticate on the system.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.


Latest bulletins with this vulnerability