GHSA-4pc3-96mx-wwc8

    Dashboard / Vulnerabilities / GHSA-4pc3-96mx-wwc8

    GHSA-4pc3-96mx-wwc8

    Published: 5 Mar 2020Last Modified: 14 Apr 2025

    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](https://github.com/PHPMailer/PHPMailer)

    Affected packages

    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.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
    v5.2.2
    v5.2.4
    v5.2.5
    v5.2.6
    v5.2.7
    v5.2.8
    v5.2.9

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High