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


0.0
medium

Snyk CVSS

    Attack Complexity Low
    User Interaction Required
    Scope Changed

    Threat Intelligence

    EPSS 0.82% (82nd percentile)
Expand this section
NVD
7.5 high

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 ID SNYK-PHP-PHPMAILERPHPMAILER-570519
  • published 28 May 2020
  • disclosed 28 May 2020
  • credit Unknown

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.