{"schemaVersion":3,"id":"CVE-2026-4021","aliases":[],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2026-03-23T23:25:50.405Z","modified":"2026-04-08T17:32:30.381Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.1,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":8.1,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":8.1,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"wordfence","score":8.1,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.0076,"percentile":0.5474,"severity":"low","asOf":"2026-10-21T00:00:00.000Z","change":{"pp":0.32399999999999995,"baselineDate":"2026-09-21T00:00:00.000Z","baselineScore":0.00436},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.0076,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.0076,"percentile":0.5474}],"last30":[{"date":"2026-09-21T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00436,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00731,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.0076,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.0076,"percentile":0.5474}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-287","name":"Improper Authentication","description":"When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/287.html"}],"affected":[{"vendor":"contest-gallery","product":"contest gallery – upload & vote photos, media, sell with paypal & stripe","name":"Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe","label":"contest gallery – upload & vote photos, media, sell with paypal & stripe","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 28.1.5","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 28.1.5","eol":null,"hubHref":"/vendor/contest-gallery/contest_gallery_-_upload__vote_photos_media_sell_with_paypal__stripe"},{"vendor":"wordpress","product":"contest-gallery","name":"Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe","label":"contest-gallery","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 28.1.5 (fixed in 28.1.6)","noFixRecorded":false,"fixedIn":"28.1.6"}],"versionsText":"≤ 28.1.5 (fixed in 28.1.6)","eol":null,"hubHref":null}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://www.wordfence.com/threat-intel/vulnerabilities/id/f1b9725b-dee5-44ca-bb33-c6812fb76adc?source=cve","label":"www.wordfence.com/threat-intel/vulnerabilities/id/f1b9725b-dee5-44ca-bb33-c6812fb76adc?source=cve","hostname":"www.wordfence.com","tags":[]},{"url":"https://plugins.trac.wordpress.org/browser/contest-gallery/trunk/v10/v10-admin/users/frontend/registry/users-registry-check-after-email-or-pin-confirmation.php#L153","label":"plugins.trac.wordpress.org/browser/…","hostname":"plugins.trac.wordpress.org","tags":[]},{"url":"https://plugins.trac.wordpress.org/browser/contest-gallery/tags/28.1.4/v10/v10-admin/users/frontend/registry/users-registry-check-after-email-or-pin-confirmation.php#L153","label":"plugins.trac.wordpress.org/browser/…","hostname":"plugins.trac.wordpress.org","tags":[]},{"url":"https://plugins.trac.wordpress.org/browser/contest-gallery/trunk/ajax/ajax-functions-frontend.php#L204","label":"plugins.trac.wordpress.org/browser/contest-gallery/trunk/ajax/ajax-functions-frontend.php","hostname":"plugins.trac.wordpress.org","tags":[]},{"url":"https://plugins.trac.wordpress.org/browser/contest-gallery/tags/28.1.4/ajax/ajax-functions-frontend.php#L204","label":"plugins.trac.wordpress.org/browser/contest-gallery/tags/28.1.4/ajax/ajax-functions-frontend.php","hostname":"plugins.trac.wordpress.org","tags":[]},{"url":"https://plugins.trac.wordpress.org/changeset?old_path=/contest-gallery/tags/28.1.5&new_path=/contest-gallery/tags/28.1.6","label":"plugins.trac.wordpress.org/changeset","hostname":"plugins.trac.wordpress.org","tags":[]},{"url":"https://www.wordfence.com/threat-intel/vulnerabilities/id/f1b9725b-dee5-44ca-bb33-c6812fb76adc","label":"www.wordfence.com/threat-intel/vulnerabilities/id/f1b9725b-dee5-44ca-bb33-c6812fb76adc","hostname":"www.wordfence.com","tags":["Vendor Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-03-23T23:25:50.405Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-04-08T17:32:30.381Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":33,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-22T13:19:43.126Z","stale":false,"partial":false}}