Skip to main content
Vulnerability Database/CVE-2024-12162

CVE-2024-12162: Ultimate Member Gallery XSS Vulnerability

CVE-2024-12162 is a reflected cross-site scripting flaw in the Video & Photo Gallery for Ultimate Member WordPress plugin that lets unauthenticated attackers inject malicious scripts. This post covers technical details, affected versions, impact, 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-12162 Overview

The Video & Photo Gallery for Ultimate Member plugin for WordPress contains a Reflected Cross-Site Scripting (XSS) vulnerability in the page parameter. The flaw affects all plugin versions up to and including 1.1.1. Insufficient input sanitization and output escaping allow unauthenticated attackers to inject arbitrary web scripts. Exploitation requires user interaction, such as clicking a crafted link. Successful attacks execute attacker-controlled JavaScript in the victim's browser session, enabling session theft, credential harvesting, or site defacement. The vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation.

Critical Impact

Unauthenticated attackers can execute arbitrary JavaScript in authenticated users' browsers by delivering a crafted URL, potentially leading to administrator account takeover on vulnerable WordPress sites.

Affected Products

  • Video & Photo Gallery for Ultimate Member plugin for WordPress
  • All versions through 1.1.1
  • WordPress sites running the vulnerable plugin with the Ultimate Member membership framework

Discovery Timeline

  • 2024-12-12 - CVE-2024-12162 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-12162

Vulnerability Analysis

The vulnerability resides in the plugin's handling of the page HTTP request parameter. The plugin reflects the parameter value into rendered HTML output without applying appropriate sanitization or encoding routines. WordPress exposes functions such as sanitize_text_field() for input filtering and esc_html() or esc_attr() for contextual output escaping, but the vulnerable code path uses neither for this parameter.

An unauthenticated attacker crafts a URL containing malicious JavaScript inside the page parameter. When a victim clicks the link, the plugin echoes the payload into the response page, and the browser executes it in the site's origin. Because the scope is changed (CVSS Scope: Changed), the injected script runs in the context of the vulnerable WordPress site and can act on resources beyond the vulnerable component itself.

The Wordfence advisory for this flaw confirms the parameter and the affected version range. Reference: Wordfence Vulnerability Report.

Root Cause

The plugin fails to neutralize special characters in the page request parameter before including the value in HTML output. This violates the standard WordPress security pattern of sanitizing on input and escaping on output. The patch referenced in the WordPress Plugin Changeset introduces proper escaping for the affected parameter.

Attack Vector

Exploitation is network-based and requires no authentication, but it does require user interaction. The typical attack flow:

  1. Attacker crafts a URL to a page served by the vulnerable plugin, embedding a JavaScript payload in the page query string parameter.
  2. Attacker delivers the link through phishing email, social media, forum posts, or a malicious site.
  3. A WordPress user, often an administrator, clicks the link while authenticated.
  4. The browser renders the response and executes the injected script in the site's origin.
  5. The script performs actions such as exfiltrating session cookies, submitting administrative forms, or creating backdoor accounts.

See the WordPress Plugin Changeset Comparison for the specific code paths modified by the vendor fix.

Detection Methods for CVE-2024-12162

Indicators of Compromise

  • Web server access logs containing requests to Ultimate Member gallery endpoints with page parameter values that include <script>, javascript:, onerror=, onload=, or URL-encoded equivalents such as %3Cscript%3E.
  • Unexpected administrator accounts, modified user roles, or new plugin installations following suspicious inbound referrers.
  • Outbound requests from browser sessions to unknown domains immediately after visits to gallery pages.

Detection Strategies

  • Deploy a web application firewall rule that inspects the page query parameter on URLs tied to the plugin and blocks payloads matching XSS signatures.
  • Review HTTP access logs for anomalous page parameter values containing HTML tags, event handlers, or encoded script delimiters.
  • Monitor WordPress audit logs for privilege changes, option modifications, or new user creation correlated with gallery page visits.

Monitoring Recommendations

  • Enable Content Security Policy (CSP) headers in report-only mode to surface inline script execution attempts originating from reflected payloads.
  • Alert on administrator session activity following a redirect from external referrers to plugin URLs containing query strings.
  • Track installed WordPress plugin inventory and version data to flag any site still running Video & Photo Gallery for Ultimate Member version 1.1.1 or earlier.

How to Mitigate CVE-2024-12162

Immediate Actions Required

  • Update the Video & Photo Gallery for Ultimate Member plugin to the version that includes the fix from changeset 3204552 on the WordPress plugin repository.
  • Rotate administrator credentials and invalidate active sessions if the plugin was exposed to untrusted traffic before patching.
  • Audit the WordPress user table for unauthorized accounts and review recent changes to the wp_options table.

Patch Information

The vendor committed a fix in changeset 3204552 on the WordPress plugin repository. Site operators should upgrade to a plugin release that incorporates this changeset. Verify the installed version from the WordPress admin Plugins page after updating.

Workarounds

  • Deactivate and remove the plugin until an update can be applied if immediate patching is not feasible.
  • Deploy a web application firewall rule or Wordfence ruleset to filter requests containing script-like payloads in the page parameter.
  • Restrict access to gallery pages behind authentication or IP allow-listing where business requirements permit.
bash
# Example WP-CLI command to check and update the vulnerable plugin
wp plugin get gallery-for-ultimate-member --field=version
wp plugin update gallery-for-ultimate-member

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.