CVE-2026-4021: CWE-287 Improper Authentication in contest-gallery Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe
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.
AI Analysis
Technical Summary
CVE-2026-4021 is an authentication bypass vulnerability in the Contest Gallery WordPress plugin. The issue arises because the email confirmation handler uses the user's email string in a SQL WHERE clause expecting a numeric user ID, leading to integer coercion when the email starts with a numeric user ID. Combined with an unauthenticated key-based login AJAX endpoint, an attacker can register with a specially crafted email, overwrite the admin's user_activation_key, and authenticate as the admin without credentials. This vulnerability affects all versions up to and including 28.1.5 and allows full administrator account takeover.
Potential Impact
Successful exploitation results in unauthenticated attackers gaining full administrator privileges on affected WordPress sites using the vulnerable Contest Gallery plugin. This compromises site integrity, confidentiality, and availability, allowing complete control over the site.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided at this time. Until a patch is available, disabling the Contest Gallery plugin or avoiding the non-default RegMailOptional=1 setting may reduce risk. Monitor vendor channels for updates and apply official patches promptly once released.
CVE-2026-4021: CWE-287 Improper Authentication in contest-gallery Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-4021 is an authentication bypass vulnerability in the Contest Gallery WordPress plugin. The issue arises because the email confirmation handler uses the user's email string in a SQL WHERE clause expecting a numeric user ID, leading to integer coercion when the email starts with a numeric user ID. Combined with an unauthenticated key-based login AJAX endpoint, an attacker can register with a specially crafted email, overwrite the admin's user_activation_key, and authenticate as the admin without credentials. This vulnerability affects all versions up to and including 28.1.5 and allows full administrator account takeover.
Potential Impact
Successful exploitation results in unauthenticated attackers gaining full administrator privileges on affected WordPress sites using the vulnerable Contest Gallery plugin. This compromises site integrity, confidentiality, and availability, allowing complete control over the site.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided at this time. Until a patch is available, disabling the Contest Gallery plugin or avoiding the non-default RegMailOptional=1 setting may reduce risk. Monitor vendor channels for updates and apply official patches promptly once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Wordfence
- Date Reserved
- 2026-03-11T20:10:49.726Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 69c1d4a7f4197a8e3ba0b3f5
Added to database: 3/24/2026, 12:02:47 AM
Last enriched: 4/9/2026, 11:36:33 AM
Last updated: 5/8/2026, 4:20:51 PM
Views: 32
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.