Contest Gallery <= 28.1.5 - Unauthenticated Privilege Escalation Admin Account Takeover via Registration Confirmation Email-to-ID Type Confusion

8.1
Improper Authentication
CVE CVE-2026-4021
CVSS 8.1 (High)
Publicly Published March 23, 2026
Last Updated April 1, 2026
Researcher Supakiad S. (m3ez) - E-CQURITY (Thailand)

Description

The Contest Gallery plugin for WordPress is vulnerable to an authentication bypass leading to admin account takeover in all versions up to, and including, 28.1.5. This is due to the email confirmation handler in `users-registry-check-after-email-or-pin-confirmation.php` using the user's email string in a `WHERE ID = %s` clause instead of the numeric user ID, combined with an unauthenticated key-based login endpoint in `ajax-functions-frontend.php`. When the non-default `RegMailOptional=1` setting is enabled, an attacker can register with a crafted email starting with the target user ID (e.g., `1poc@example.test`), trigger the confirmation flow to overwrite the admin's `user_activation_key` via MySQL integer coercion, and then use the `post_cg1l_login_user_by_key` AJAX action to authenticate as the admin without any credentials. This makes it possible for unauthenticated attackers to take over any WordPress administrator account and gain full site control.

Learn more about Authentication Bypass vulnerabilities and how to prevent them.

References

Share

Vulnerability Details for Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe

Software Type Plugin
Software Slug contest-gallery (view on wordpress.org)
Patched? Yes
Remediation Update to version 28.1.6, or a newer patched version
Affected Version
  • <= 28.1.5
Patched Version
  • 28.1.6

Recent vulnerabilities in Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe

# Title CVE ID CVSS Researchers Date
1 Contest Gallery <= 30.0.6 - Unauthenticated Stored Cross-Site Scripting CVE-2026-65447 7.2 Jayant Kamble July 27, 2026
2 Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe <= 30.0.0 - Authenticated (Contributor+) SQL Injection CVE-2026-57662 6.5 Trương Hữu Phúc (truonghuuphuc) June 26, 2026
3 Contest Gallery <= 30.0.2 - Authenticated (Author+) Privilege Escalation via 'RegistryUserRole' Parameter CVE-2026-12165 8.8 Chloe Chamberland, Wordfence PRISM June 16, 2026
4 Contest Gallery <= 28.1.6 - Unauthenticated SQL Injection CVE-2026-8912 7.5 Leonid Semenenko (lsemenenko) May 18, 2026
5 Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe <= 28.1.6 - Authenticated (Subscriber+) Stored Cross-Site Scripting CVE-2026-42656 6.4 endy April 29, 2026
6 Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe <= 28.1.7 - Authenticated (Subscriber+) Sensitive Information Exposure CVE-2026-42660 4.3 Jakub Herman April 29, 2026
7 Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe <= 28.1.7 - Missing Authorization CVE-2026-42657 5.3 endy April 29, 2026
8 Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe <= 28.1.6 - Unauthenticated SQL Injection CVE-2026-40771 7.5 Trương Hữu Phúc (truonghuuphuc) April 21, 2026
9 Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe <= 28.1.2.2 - Missing Authorization CVE-2026-25035 5.3 daroo March 23, 2026
10 Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe <= 28.1.2.1 - Authenticated (Subscriber+) Server-Side Request Forgery CVE-2026-24964 6.4 lilmingwa13 March 10, 2026

Did you know Wordfence Intelligence provides free personal and commercial API access to our comprehensive WordPress vulnerability database, along with a free webhook integration to stay on top of the latest vulnerabilities added and updated in the database? Get started today!

Learn more

Want to get notified of the latest vulnerabilities that may affect your WordPress site?
Install Wordfence on your site today to get notified immediately if your site is affected by a vulnerability that has been added to our database.

Get Wordfence

The Wordfence Intelligence WordPress vulnerability database is completely free to access and query via API. Please review the documentation on how to access and consume the vulnerability data via API.

Documentation