Skip to main content

CVE-2024-9778: ImagePress WordPress Plugin CSRF Vulnerability

CVE-2024-9778 is a Cross-Site Request Forgery flaw in the ImagePress WordPress plugin that lets attackers modify settings via forged requests. This article covers technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-9778 Overview

CVE-2024-9778 is a Cross-Site Request Forgery (CSRF) vulnerability in the ImagePress – Image Gallery plugin for WordPress. The flaw affects all versions up to and including 1.2.2. The root cause is missing or incorrect nonce validation in the imagepress_admin_page function. Unauthenticated attackers can update plugin settings, including redirection URLs, by tricking a site administrator into clicking a crafted link. The vulnerability is tracked under CWE-352 and impacts sites running the getbutterfly/imagepress plugin.

Critical Impact

Attackers can modify plugin settings and inject arbitrary redirection URLs, enabling downstream phishing or malware distribution against site visitors.

Affected Products

  • ImagePress – Image Gallery plugin for WordPress, all versions through 1.2.2
  • Vendor: getbutterfly
  • CPE: cpe:2.3:a:getbutterfly:imagepress:*:*:*:*:*:wordpress:*:*

Discovery Timeline

  • 2024-10-12 - CVE-2024-9778 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-9778

Vulnerability Analysis

The vulnerability resides in the plugin's settings handler, imagepress_admin_page, which processes administrative form submissions without validating a WordPress nonce. WordPress nonces are anti-CSRF tokens generated per-user per-action. When the handler omits check_admin_referer() or wp_verify_nonce(), the server accepts any authenticated request regardless of origin.

An attacker hosts a page containing a hidden form or JavaScript that submits crafted parameters to the target site's admin endpoint. If a logged-in administrator visits the attacker page, the browser sends the request with the admin's session cookie. The plugin then processes the settings update as legitimate.

Modifiable settings include redirection URLs, which the plugin uses to send users to attacker-controlled destinations. This creates a pivot for phishing, malware delivery, or open-redirect abuse in downstream campaigns.

Root Cause

The root cause is missing anti-CSRF token verification in the settings update flow of includes/page-settings.php. Referenced lines 2, 106, 267, 380, and 461 of the file handle form processing without invoking WordPress nonce checks before writing to the options table.

Attack Vector

Exploitation requires user interaction from an authenticated administrator. The attacker delivers a link or embeds a request on a third-party page. When the administrator loads the resource, the browser issues a same-origin-authenticated request to the WordPress admin URL, and the plugin persists the attacker's values.

No authentication is required on the attacker side, and no privilege exists on the target beyond the tricked administrator's session. See the Wordfence advisory for additional context.

Detection Methods for CVE-2024-9778

Indicators of Compromise

  • Unexpected changes to ImagePress plugin settings, particularly redirection URL fields.
  • HTTP POST requests to wp-admin/admin.php?page=imagepress originating from external Referer headers.
  • Site visitors reporting redirects to unfamiliar or suspicious domains after clicking image gallery links.

Detection Strategies

  • Audit the WordPress wp_options table for changes to ImagePress option keys and compare against a known-good baseline.
  • Inspect web server access logs for POST requests to the plugin's admin page with off-site Referer values or missing _wpnonce parameters.
  • Correlate administrator browsing activity with subsequent plugin configuration changes to identify CSRF-driven modifications.

Monitoring Recommendations

  • Enable WordPress activity logging to track option updates and administrator actions with timestamps.
  • Alert on outbound redirects from the site to domains not on an approved allowlist.
  • Monitor for the presence of vulnerable plugin versions (1.2.2 and earlier) across managed WordPress deployments.

How to Mitigate CVE-2024-9778

Immediate Actions Required

  • Update the ImagePress – Image Gallery plugin to the version released in WordPress Changeset #3167164 or later.
  • Review current plugin settings, especially redirection URLs, and restore known-good values if tampering is suspected.
  • Force re-authentication of WordPress administrators and rotate session cookies after patching.

Patch Information

The vendor addressed the issue in WordPress Changeset #3167164, which introduces nonce validation to the affected settings handler. Administrators should install the patched release from the WordPress plugin repository through the standard plugin update workflow.

Workarounds

  • Deactivate the ImagePress plugin until the patched version is installed.
  • Restrict administrator browsing sessions to trusted contexts and require re-authentication for sensitive admin pages.
  • Deploy a Web Application Firewall (WAF) rule that blocks POST requests to the plugin's admin endpoint lacking a valid _wpnonce parameter or with an external Referer.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.