Improper Input Validation Affecting phpmailer/phpmailer package, versions <6.1.6


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.63% (80th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Input Validation vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-PHPMAILERPHPMAILER-570519
  • published28 May 2020
  • disclosed28 May 2020
  • creditUnknown

Introduced: 28 May 2020

CVE-2020-13625  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

Upgrade phpmailer/phpmailer to version 6.1.6 or higher.

Overview

Affected versions of this package are vulnerable to Improper Input Validation. An attachment with a double quote within the attachment name, eg: $mail->addAttachment('/tmp/attachment.tmp', 'filename.html";.jpg');

will result in a message containing these headers:

Content-Type: application/octet-stream; name="filename.html";.jpg"
Content-Disposition: attachment; filename="filename.html";.jpg"

The attachment will be named filename.html, and the trailing ";.jpg" will be ignored.

This can lead in bypassing mail filters based on MIME types.

CVSS Scores

version 3.1