GHSA-4pc3-96mx-wwc8

Suggest an improvement
Source
https://github.com/advisories/GHSA-4pc3-96mx-wwc8
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/03/GHSA-4pc3-96mx-wwc8/GHSA-4pc3-96mx-wwc8.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-4pc3-96mx-wwc8
Aliases
Published
2020-03-05T22:09:14Z
Modified
2024-02-19T05:32:50.685652Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Remote code execution in PHPMailer
Details

Impact

The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code by leveraging improper interaction between the escapeshellarg function and internal escaping performed in the mail function in PHP. NOTE: this vulnerability exists because of an incorrect fix for CVE-2016-10033.

This issue really emphasises that it's worth avoiding the built-in PHP mail() function entirely.

Patches

Fixed in 5.2.20

Workarounds

Send via SMTP to localhost instead of calling the mail() function.

References

https://nvd.nist.gov/vuln/detail/CVE-2016-10045 See also https://nvd.nist.gov/vuln/detail/CVE-2016-10033

For more information

If you have any questions or comments about this advisory: * Open a private issue in the PHPMailer project

References

Affected packages

Packagist / phpmailer/phpmailer

Package

Name
phpmailer/phpmailer
Purl
pkg:composer/phpmailer/phpmailer

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.0.0
Fixed
5.2.20

Affected versions

v5.*

v5.2.2
v5.2.4
v5.2.5
v5.2.6
v5.2.7
v5.2.8
v5.2.9
v5.2.10
v5.2.11
v5.2.12
v5.2.13
v5.2.14
v5.2.15
v5.2.16
v5.2.17
v5.2.18
v5.2.19