GitHub Advisoryadvisory · Packagist

GHSA-7w4p-72j7-v7c2 Phar object injection in PHPMailer

HIGH Published 2020-03-05 Modified 2021-08-19 Official page ↗
Aliases
CVE-2018-19296
Ecosystem
Packagist
Packages
phpmailer/phpmailer
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weaknesses
CWE-1321, CWE-502, CWE-915
Reviewed
2020-03-05

Affected packages

• Packagist phpmailer/phpmailer: >= 5.0.0, < 5.2.27 → fixed in 5.2.27 • Packagist phpmailer/phpmailer: >= 6.0.0, < 6.0.6 → fixed in 6.0.6

Description

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

Related

Alias · CVE (1)

  • CVE-2018-19296 PHPMailer before 5.2.27 and 6.x before 6.0.6 is vulnerable to an object injection attack. vulnerability

Weakness · CWE (3)

  • CWE-1321 Improperly Controlled Modification of Object Prototype Attributes weakness
  • CWE-502 Deserialization of Untrusted Data weakness
  • CWE-915 Improperly Controlled Modification of Dynamically-Determined Object Attributes weakness

References