CVE-2026-12165
WordPress vulnerability analysis and mitigation

Overview

CVE-2026-12165 is a Privilege Escalation vulnerability in the Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe plugin for WordPress, affecting all versions up to and including 30.0.2. The flaw allows authenticated attackers with Author-level access or above to escalate their privileges to Administrator by manipulating the RegistryUserRole parameter. It was published on June 17, 2026, and carries a CVSS v3.1 base score of 8.8 (High) (Feedly, CVEFeed).

Technical details

The root cause is Improper Privilege Management (CWE-269). The plugin registers its admin menu at the edit_posts capability level, granting Contributor-level and above users access to admin pages and a valid cg_admin nonce. 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 only processed through sanitize_text_field() and htmlentities() — with no allowlist validation of permitted role names. When a new Google sign-in account is registered, the cg_create_wp_user_from_google_user function reads the attacker-controlled RegistryUserRole value directly from the contest_gal1ery_registry_and_login_options database table and passes it to wp_update_user(), promoting the new account to Administrator (Feedly, VulnDB).

Impact

Successful exploitation grants an attacker full administrative control over the affected WordPress site. An authenticated user with as little as Author-level access can promote a newly registered Google sign-in account to Administrator, enabling complete site takeover — including installing malicious plugins, modifying content, exfiltrating user data, and potentially pivoting to the underlying server. The NVD SSVC assessment rates the technical impact as total, affecting confidentiality, integrity, and availability (Feedly).

Exploitation steps

  1. Gain authenticated access: Obtain an account on the target WordPress site with at least Author-level privileges (sufficient to access the plugin's admin pages via the edit_posts capability).
  2. Access the plugin admin page: Navigate to the Contest Gallery admin settings page, which is accessible due to the plugin registering its menu at the edit_posts capability level. Retrieve a valid cg_admin nonce from the page source.
  3. Modify the RegistryUserRole option: Submit a crafted POST request to the change-options-and-sizes.php handler with the RegistryUserRole parameter set to administrator and the valid cg_admin nonce. The handler will save this value to the contest_gal1ery_registry_and_login_options database table without role allowlist validation.
  4. Register a new Google account: Trigger the Google sign-in registration flow on the target site to create a new WordPress user account.
  5. Achieve Administrator access: The cg_create_wp_user_from_google_user function reads the attacker-controlled RegistryUserRole value (administrator) from the database and passes it to wp_update_user(), automatically promoting the new Google account to Administrator role — granting full site control (Feedly).

Indicators of compromise

  • Logs: WordPress access logs showing POST requests to the Contest Gallery option-saving handler (change-options-and-sizes.php) from Author/Contributor-level user accounts; unexpected user role changes in wp_usermeta or audit logs showing administrator role assignment to newly registered accounts.
  • Database: The contest_gal1ery_registry_and_login_options table containing RegistryUserRole set to administrator when it should reflect a lower-privilege role.
  • User Accounts: Newly created WordPress Administrator accounts associated with Google sign-in that were not provisioned by site administrators; unexpected entries in wp_users with recent registration timestamps and Administrator role.
  • File System: No specific file artifacts expected, but monitor for new plugin installations or theme modifications made by unauthorized Administrator accounts following privilege escalation (Feedly).

Mitigation and workarounds

Update the Contest Gallery plugin to a version beyond 30.0.2 as soon as a patched release becomes available. In the interim, restrict the edit_posts capability to trusted users only and disable Google sign-in registration if not required. Audit all existing WordPress user accounts for unauthorized Administrator-level accounts, particularly those registered via Google sign-in. Monitor new user registrations and implement role-based access controls to limit plugin admin page access (Feedly, Wordfence).

Community reactions

Wordfence included this vulnerability in their weekly WordPress vulnerability report for June 15–21, 2026, highlighting it as a notable privilege escalation issue in the WordPress plugin ecosystem (Wordfence). The vulnerability has been indexed by multiple threat intelligence aggregators including VulnDB, ENISA EUVD, and CVEFeed, indicating broad awareness in the security community. No significant social media controversy or vendor public statement has been observed beyond standard advisory publication.

Additional resources


SourceThis report was generated using AI

Related WordPress vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-13147CRITICAL9.1
  • kirki
NoYesJul 20, 2026
CVE-2026-9833HIGH7.1
  • tag-groups
NoYesJul 20, 2026
CVE-2026-13432MEDIUM5.4
  • image-sizes
NoYesJul 20, 2026
CVE-2026-13156MEDIUM5.4
  • mailersend-official-smtp-integration
NoYesJul 20, 2026
CVE-2026-8825MEDIUM4.9
  • elementor
NoYesJul 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management