Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security] Bump phpmailer/phpmailer from 6.0.7 to 6.1.6 #192

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

dependabot-preview[bot]
Copy link

Bumps phpmailer/phpmailer from 6.0.7 to 6.1.6. This update includes a security fix.

Vulnerabilities fixed

Sourced from The GitHub Security Advisory Database.

Insufficient output escaping of attachment names in PHPMailer

Impact

CWE-116: Incorrect output escaping.

An attachment added like this (note the double quote within the attachment name, which is entirely valid):

$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. Mail filters that reject .html attachments but permit .jpg attachments may be fooled by this.

Note that the MIME type itself is obtained automatically from the source filename (in this case attachment.tmp, which maps to a generic application/octet-stream type), and not the name given to the attachment (though these are the same if a separate name is not provided), though it can be set explicitly in other parameters to attachment methods.

Patches

Patched in PHPMailer 6.1.6 by escaping double quotes within the name using a backslash, as per RFC822 section 3.4.1, resulting in correctly escaped headers like this:

Content-Type: application/octet-stream; name="filename.html\";.jpg"
... (truncated)

Affected versions: < 6.1.6

Release notes

Sourced from phpmailer/phpmailer's releases.

PHPMailer 6.1.6

This is a security release, with some other minor changes. For full details, refer to the advisory.

  • SECURITY Fix insufficient output escaping bug in file attachment names. CVE-2020-13625. Reported by Elar Lang of Clarified Security.
  • Correct Armenian ISO language code from am to hy, add mapping for fallback
  • Use correct timeout property in debug output

PHPMailer 6.1.5

This is a maintenance release.

  • Reject invalid custom headers that are empty or contain breaks
  • Various fixes for DKIM issues, especially when using mail() transport
  • Drop the l= length tag from DKIM signatures; it's a mild security risk
  • Ensure CRLF is used explicitly when needed, rather than static::$LE
  • Add a method for trimming header content consistently
  • Some minor tweaks to resolve static analyser complaints
  • Check that attachment files are readable both when adding and when sending
  • Work around Outlook bug in mishandling MIME preamble
  • Danish translation improvements

PHPMailer 6.1.4

The RFC2047 folding added in 6.1.0 was a little overenthusiastic; It will now only happen when header lines exceed 998 chars.

  • Clean up hostname handling
  • Avoid IDN error on older PHP versions, prep for PHP 8.0
  • Don't force RFC2047 folding unnecessarily
  • Enable tests on full release of PHP 7.4

PHPMailer 6.1.3

  • Fix an issue preventing injected debug handlers from working
  • Fix an issue relating to connection timeout
  • Add SMTP::MAX_REPLY_LENGTH constant
  • Remove some dev dependencies; phpdoc no longer included
  • Fix an issue where non-compliant servers returning bare codes caused an SMTP hang

PHPMailer 6.1.2

  • Substantial revision of DKIM header generation
  • Use shorter hashes for auto-generated CID values
  • Fix format of content-id headers, and only use them for inline attachments
  • Remove all use of XHTML
  • Lots of coding standards cleanup
  • API docs are now auto-updated via GitHub actions
  • Fix header separation bug created in 6.1.1
  • Fix misidentification of background attributes in SVG images in msgHTML

PHPMailer 6.1.1

No code changes, just retagging for a misordered commit for 6.1.0.

PHPMailer 6.1.0

... (truncated)
Changelog

Sourced from phpmailer/phpmailer's changelog.

Version 6.1.6 (May 27th, 2020)

  • SECURITY Fix insufficient output escaping bug in file attachment names. CVE-2020-13625. Reported by Elar Lang of Clarified Security.
  • Correct Armenian ISO language code from am to hy, add mapping for fallback
  • Use correct timeout property in debug output

Version 6.1.5 (March 14th, 2020)

  • Reject invalid custom headers that are empty or contain breaks
  • Various fixes for DKIM issues, especially when using mail() transport
  • Drop the l= length tag from DKIM signatures; it's a mild security risk
  • Ensure CRLF is used explicitly when needed, rather than static::$LE
  • Add a method for trimming header content consistently
  • Some minor tweaks to resolve static analyser complaints
  • Check that attachment files are readable both when adding and when sending
  • Work around Outlook bug in mishandling MIME preamble
  • Danish translation improvements

Version 6.1.4 (December 10th, 2019)

  • Clean up hostname handling
  • Avoid IDN error on older PHP versions, prep for PHP 8.0
  • Don't force RFC2047 folding unnecessarily
  • Enable tests on full release of PHP 7.4

Version 6.1.3 (November 21st, 2019)

  • Fix an issue preventing injected debug handlers from working
  • Fix an issue relating to connection timeout
  • Add SMTP::MAX_REPLY_LENGTH constant
  • Remove some dev dependencies; phpdoc no longer included
  • Fix an issue where non-compliant servers returning bare codes caused an SMTP hang

Version 6.1.2 (November 13th, 2019)

  • Substantial revision of DKIM header generation
  • Use shorter hashes for auto-generated CID values
  • Fix format of content-id headers, and only use them for inline attachments
  • Remove all use of XHTML
  • Lots of coding standards cleanup
  • API docs are now auto-updated via GitHub actions
  • Fix header separation bug created in 6.1.1
  • Fix misidentification of background attributes in SVG images in msgHTML

Version 6.1.1 (September 27th 2019)

  • Fix misordered version tag

Version 6.1.0 (September 27th 2019)

  • Multiple bug fixes for folding of long header lines, thanks to @caugner
  • Add support for RFC2387 child element content-type hint in multipart/related structures.
  • Support for Ical event methods other than REQUEST, thanks to @puhr-mde
  • Change header folding and param separation to use spaces instead of tabs
  • Use ; to separate multiple MIME header params
  • Add support for RFC3461 DSN messages
  • IMAP example code fixed
... (truncated)
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Bumps [phpmailer/phpmailer](https://github.com/PHPMailer/PHPMailer) from 6.0.7 to 6.1.6. **This update includes a security fix.**
- [Release notes](https://github.com/PHPMailer/PHPMailer/releases)
- [Changelog](https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md)
- [Commits](PHPMailer/PHPMailer@v6.0.7...v6.1.6)

Signed-off-by: dependabot-preview[bot] <[email protected]>
@dependabot-preview dependabot-preview bot added dependencies security fix Security fix generated by WhiteSource labels May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies security fix Security fix generated by WhiteSource
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants