CVE-2020-36326

PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname

published April 28, 2021

CVSS
—
EPSS
3%
Percentile
87.6
In the wild
Unconfirmed
What it is

⚠️ A sneaky object injection vulnerability hides in PHPMailer's addAttachment method! It’s like a delivery person accepting a package without checking if it’s from the right sender. 📦 Think of PHPMailer as a mailroom. Normally, the staff checks who’s sending packages, but a recent policy change lets in deliveries from questionable sources that should have been flagged. That’s how this vulnerability operates, by allowing malicious objects to sneak through unchecked! An attacker could potentially inject malicious objects through specially crafted UNC pathnames, leading to unauthorized actions on the server. Although the severity is still uncertain, the risk of exploitation means a determined attacker could leverage this flaw to compromise server integrity.

Put simply

Think of PHPMailer as a mailroom. Normally, the staff checks who’s sending packages, but a recent policy change lets in deliveries from questionable sources that should have been flagged. That’s how this vulnerability operates, by allowing malicious objects to sneak through unchecked! This vulnerability in PHPMailer (versions 6.1.8 to 6.4.0) arises from improper handling of UNC pathnames in the addAttachment method, allowing for object injection during Phar deserialization. Essentially, it opens the door for attackers to manipulate the system through crafted attachments.

What to do

An attacker could potentially inject malicious objects through specially crafted UNC pathnames, leading to unauthorized actions on the server. Although the severity is still uncertain, the risk of exploitation means a determined attacker could leverage this flaw to compromise server integrity. Upgrade PHPMailer to version 6.4.1 or later to eliminate this vulnerability. Conduct a thorough code review of attachment handling and ensure all inputs are properly validated. It’s essential to implement additional security measures to mitigate future risks. You've got this! Just follow these steps and you'll be on your way to securing your application! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.03095 · 87.6th percentile
Published
2021-04-28T02:21Z
EPSS history
Timeline
  • 28 APR 02:21Z
    PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname
    cvelistv5