Breeze Cache <= 2.4.4 - Unauthenticated Arbitrary File Upload via fetch_gravatar_from_remote
Description
The Breeze Cache plugin for WordPress is vulnerable to arbitrary file uploads due to missing file type validation in the 'fetch_gravatar_from_remote' function in all versions up to, and including, 2.4.4. This makes it possible for unauthenticated attackers to upload arbitrary files on the affected site's server which may make remote code execution possible. The vulnerability can only be exploited if "Host Files Locally - Gravatars" is enabled, which is disabled by default.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HTechnical Details
What Changed in the Fix
Changes introduced in v2.4.5
Source Code
WordPress.org SVNThis exploitation research plan details the steps required to achieve unauthenticated remote code execution (RCE) on a WordPress site running Breeze Cache <= 2.4.4. ### 1. Vulnerability Summary The Breeze Cache plugin for WordPress is vulnerable to an unrestricted file upload in the `fetch_gravatar…
Show full research plan
This exploitation research plan details the steps required to achieve unauthenticated remote code execution (RCE) on a WordPress site running Breeze Cache <= 2.4.4.
1. Vulnerability Summary
The Breeze Cache plugin for WordPress is vulnerable to an unrestricted file upload in the fetch_gravatar_from_remote function. When the "Host Files Locally - Gravatars" setting is enabled, the plugin attempts to download Gravatar images to the local server to improve performance. However, it fails to validate the file extension or content of the remote file before saving it to a publicly accessible directory. An attacker can trigger this process by providing a URL that ends in .php (or another executable extension) in a context where an avatar is rendered, leading to arbitrary code execution.
2. Attack Vector Analysis
- Endpoint: Any page or action that renders a user avatar (e.g., viewing a post with comments, viewing an author's profile, or certain AJAX/REST endpoints).
- Vulnerable Function:
fetch_gravatar_from_remoteininc/class-breeze-cache-cronjobs.php. - Precondition: The setting
breeze-store-gravatars-locallymust be enabled. - Authentication: None (Unauthenticated).
- Payload Location: The URL of the Gravatar image, which can be influenced via the
get_avatarfilter.
3. Code Flow
- Entry Point: An unauthenticated user visits a page where WordPress renders an avatar
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.