GHSA-7w4p-72j7-v7c2

Suggest an improvement
Source
https://github.com/advisories/GHSA-7w4p-72j7-v7c2
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/03/GHSA-7w4p-72j7-v7c2/GHSA-7w4p-72j7-v7c2.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-7w4p-72j7-v7c2
Aliases
Published
2020-03-05T22:08:55Z
Modified
2024-02-21T05:33:19.659123Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Phar object injection in PHPMailer
Details

PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing phar:// paths into addAttachment() and other functions that may receive unfiltered local paths, possibly leading to RCE. See this article for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as phar://. Reported by Sehun Oh of cyberone.kr.

Impact

Object injection, possible remote code execution

Patches

Fixed in 6.0.6 and 5.2.27

Workarounds

Validate and sanitise user input before using.

References

https://nvd.nist.gov/vuln/detail/CVE-2018-19296

For more information

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

Database specific
{
    "nvd_published_at": "2018-11-16T09:29:00Z",
    "cwe_ids": [
        "CWE-1321",
        "CWE-502",
        "CWE-915"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2020-03-05T22:08:10Z"
}
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.27

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
v5.2.20
v5.2.21
v5.2.22
v5.2.23
v5.2.24
v5.2.25
v5.2.26

Packagist / phpmailer/phpmailer

Package

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

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.0.0
Fixed
6.0.6

Affected versions

v6.*

v6.0.0
v6.0.1
v6.0.2
v6.0.3
v6.0.4
v6.0.5