CVE-2026-12165: Contest Gallery WordPress Plugin Privilege Escalation to Administrator
The Contest Gallery WordPress plugin contains a privilege escalation flaw affecting versions up to 30.0.2. A contributor-level user can manipulate a plugin setting to trick the system into promoting their Google sign-in account to administrator. The vulnerability exists because the plugin grants access to its admin pages at a low capability level (allowing contributors through) but fails to validate that a critical user role setting stays within safe bounds. Once changed, any new Google account signing in via that setting gets those elevated permissions.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.8 HIGH · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-269
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-17 / 2026-06-17
NVD description (verbatim)
The Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe plugin for WordPress is vulnerable to Privilege Escalation in all versions up to, and including, 30.0.2 via the `RegistryUserRole` parameter. This is due to the plugin's admin menu being registered at the `edit_posts` capability level — granting Contributor-level users access to the plugin's admin pages and a valid `cg_admin` nonce — while the option-saving handler in `change-options-and-sizes.php` performs no `current_user_can()` capability check beyond `check_admin_referer('cg_admin')`, and the `RegistryUserRole` value is processed only through `sanitize_text_field()` and `htmlentities()` without restriction to an allowlist of permitted role names. This makes it possible for authenticated attackers, with author-level access and above, to overwrite the plugin's stored `RegistryUserRole` option with `administrator`, which the `cg_create_wp_user_from_google_user` function then reads back from the `contest_gal1ery_registry_and_login_options` database table without any allowlist validation and passes directly to `wp_update_user()`, effectively promoting a newly registered Google sign-in account to Administrator.
6 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability chains two failures in the Contest Gallery plugin. First, the admin menu registration uses `edit_posts` capability, permitting Contributor access. Second, the `change-options-and-sizes.php` handler saving the `RegistryUserRole` option relies solely on nonce validation (`check_admin_referer('cg_admin')`) without calling `current_user_can()` for capability enforcement. The `RegistryUserRole` value is sanitized via `sanitize_text_field()` and `htmlentities()` but not restricted to an allowlist of valid roles. When `cg_create_wp_user_from_google_user` reads this option from the database, it passes the unsanitized role directly to `wp_update_user()` without validation, enabling role promotion to Administrator.
Business impact
An authenticated contributor account — commonly held by freelancers, guest authors, or external partners — becomes a vehicle for obtaining full administrative control of a WordPress site. Once an attacker has Administrator access, they can install malicious plugins, alter site content, exfiltrate data, inject backdoors, or shut down the site entirely. Organizations relying on the Contest Gallery plugin for photo contests, user engagement, or community features face exposure to complete account takeover and operational compromise.
Affected systems
The Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe plugin for WordPress is affected in all versions up to and including 30.0.2. Any WordPress installation running this plugin version is at risk if it permits Google sign-in registration and has contributors or higher-level users with access to admin pages.
Exploitability
Exploitation requires an authenticated attacker with at least Contributor-level WordPress access. No additional interaction, user interaction, or complex conditions are needed; the attacker directly modifies the plugin setting and waits for a new Google sign-in registration to be processed with the malicious role. The attack is over the network with low attack complexity, making it straightforward to execute.
Remediation
Update the Contest Gallery plugin to a patched version released after 30.0.2. Verify the availability of security updates from the plugin vendor. As an interim measure, restrict Contributor-level user accounts, audit existing admin access logs for suspicious role changes, and review user accounts created via Google sign-in for unexpected Administrator privileges.
Patch guidance
Check the plugin vendor's repository or security advisory page for version 30.0.3 or later. Apply the update through the WordPress plugin dashboard or manually upload the patched version. Verify the update has completed successfully and test Google sign-in functionality with a non-admin test account to confirm normal behavior is restored.
Detection guidance
Monitor the `wp_options` table for unexpected changes to the `contest_gal1ery_registry_and_login_options` entry, particularly modifications to `RegistryUserRole`. Audit user creation logs for Google sign-in accounts assigned Administrator role. Check admin audit logs for activity from Contributor-level users accessing the Contest Gallery admin pages followed by option modifications. Review user role escalations post-publication of this advisory.
Why prioritize this
This is a HIGH-severity privilege escalation requiring only authenticated access at the Contributor level — a role commonly delegated to external or temporary users. The impact is complete administrative compromise. Organizations should prioritize patching after assessing whether they use this plugin and how many users have Contributor access.
Risk score, explained
CVSS 3.1 score of 8.8 (HIGH) reflects network-accessible attack vector, low complexity, low privilege requirements (Contributor), no user interaction needed, and high impact across confidentiality, integrity, and availability. The vulnerability is straightforward to exploit and yields complete system control.
Frequently asked questions
Can an attacker exploit this without a WordPress user account?
No. The vulnerability requires authentication as at least a Contributor-level user. An attacker must have valid credentials to access the WordPress site and modify the plugin's admin settings.
Does disabling Google sign-in prevent the exploit?
Functionally yes, because exploitation requires a new Google account registration to be promoted. However, the underlying privilege escalation vulnerability remains present. The proper fix is to update the plugin.
If we update to version 30.0.3 or later, do we need to audit existing roles?
Yes. We recommend reviewing all Administrator accounts created via Google sign-in after this vulnerability was introduced, and checking audit logs for unexpected role escalations on Contributor accounts. This helps identify if the flaw was exploited before patching.
Does this affect WordPress sites that don't use the Contest Gallery plugin?
No. This vulnerability is specific to installations running the Contest Gallery plugin. Sites without this plugin are unaffected.
This analysis is provided for informational purposes and based on CVE-2026-12165 published data. No exploit code or weaponized proof-of-concept is provided. Organizations should verify all patch version numbers and vendor guidance against official plugin security advisories before applying updates. This document does not constitute legal advice, compliance guidance, or a complete security assessment. Consult vendor documentation and your security team for deployment-specific decisions. Source: NVD (public-domain), retrieved 2026-07-26. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2024-38487HIGHapi-gateway Container Escape via Root Privilege Mismanagement
- CVE-2025-31272HIGHmacOS Launch Constraint Bypass and Local Privilege Escalation
- CVE-2025-5088HIGHCVX Redis Privilege Escalation to Root Access
- CVE-2026-0009HIGHAndroid Tapjacking Local Privilege Escalation Vulnerability
- CVE-2026-0019HIGHAndroid SettingsLib Privilege Escalation Vulnerability
- CVE-2026-0063HIGHAndroid Carrier Restriction Bypass Leading to Local Privilege Escalation
- CVE-2026-0089HIGHAndroid PackageInstallerService Permission Check Bypass – Local Privilege Escalation
- CVE-2026-0091HIGHAndroid Launcher Privilege Escalation Vulnerability (CVSS 7.8)