CVE-2023-35169CWE-22

php-imap vulnerable to RCE through a directory traversal vulnerability

Critical · published June 23, 2023

CVSS v3.1
9.1
EPSS
3%
Percentile
88.0
In the wild
Unconfirmed
What it is

🔥 Unauthenticated users can exploit this vulnerability to gain full access to your system! Imagine a sneaky delivery person who can drop off any package at your doorstep without anyone checking what’s inside — that’s what this flaw does with email attachments! If the filename isn't sanitized, it’s like leaving your door wide open for an intruder. An attacker could send a carefully crafted email with a malicious attachment, allowing them to execute whatever code they want on your server. This could lead to unauthorized access, data breaches, or even total system compromise. The potential for chaos is absolutely devastating!

Put simply

Imagine a sneaky delivery person who can drop off any package at your doorstep without anyone checking what’s inside — that’s what this flaw does with email attachments! If the filename isn't sanitized, it’s like leaving your door wide open for an intruder. This vulnerability in PHP-IMAP arises from an unsanitized attachment filename, allowing directory traversal and remote code execution if the script saves attachments without validating filenames.

What to do

An attacker could send a carefully crafted email with a malicious attachment, allowing them to execute whatever code they want on your server. This could lead to unauthorized access, data breaches, or even total system compromise. The potential for chaos is absolutely devastating! Upgrade to version 5.3.0 immediately to patch this vulnerability. Ensure that any attachment filenames are sanitized rigorously and avoid using unsanitized user input in `Attachment::save()`. Regular audits of your email handling processes are also recommended! You've got this! Take these steps, and you'll strengthen your defenses in no time! 🛡️

The record
Technical detail
CVSS v3.1
9.1 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.03191 · 88.0th percentile
Weakness
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Published
2023-06-23T20:37Z
EPSS history
Timeline
  • 23 JUN 20:37Z
    php-imap vulnerable to RCE through a directory traversal vulnerability
    cvelistv5