Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessBrowse public gallery page
-
DeliveryScrape cg_nonce from HTML
-
ExploitPOST crafted form_input to admin-ajax.php
-
ExecutionTrigger unquoted concatenation in users-upload-check.php
-
ImpactExfiltrate database rows via UNION/blind SQLi
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Target must be running the Contest Gallery WordPress plugin at version 28.1.6 or earlier with at least one publicly accessible gallery page so the attacker can scrape the 'cg1l_action' / 'cg_nonce' value emitted to anonymous visitors; the vulnerable 'post_cg_gallery_form_upload' AJAX action must be reachable via /wp-admin/admin-ajax.php (the default for active WordPress plugins), and the attacker must drive the 'cb' branch of users-upload-check.php by supplying the relevant 'form_input' identifier. Limiting factors are minimal: no authentication, no user interaction, and no non-default configuration are required per CVSS PR:N/UI:N, but sites that have removed or gated all public gallery pages, deactivated the plugin, or front the site with a WAF that blocks this specific AJAX action are not exploitable. |
| Impact | The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) describes a network-reachable, low-complexity, unauthenticated attack with high confidentiality impact and no integrity or availability impact, which aligns with a UNION/blind SQLi used for data exfiltration rather than data modification. The exposure of the gating nonce in public page source removes the typical 'nonce required' mitigating factor, so AC:L is justified. EPSS and CISA KEV data were not provided in the input, so exploitation probability and active-exploitation status cannot be quantified here; no public exploit identified at time of analysis. Practical risk is meaningful for any public WordPress site running Contest Gallery <= 28.1.6 because the prerequisites are minimal and the data on offer typically includes WordPress user records and form submissions; treat as a real priority for any internet-facing install while acknowledging EPSS/KEV signals are missing. |
| Exploit ScenarioDerived | An attacker loads any public gallery page on the target WordPress site, scrapes the embedded 'cg1l_action' / 'cg_nonce' value from the HTML, and sends a crafted POST to /wp-admin/admin-ajax.php invoking 'post_cg_gallery_form_upload' with a SQL payload in 'form_input' that drives the 'cb' branch in users-upload-check.php. By appending UNION SELECT or boolean/time-based clauses to the unquoted $f_input_id concatenation, the attacker exfiltrates rows from wp_users (including password hashes and emails) and other tables, with no authentication and minimal complexity. No public exploit identified at time of analysis, though the trac line references make rediscovery straightforward. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 19, 2026
SQL injection in the Contest Gallery WordPress plugin (versions through 28.1.6) allows unauthenticated remote attackers to extract sensitive database contents by abusing the 'form_input' parameter handled by the 'post_cg_gallery_form_upload' AJAX action. The endpoint is gated only by a public nonce that is exposed in the page source of any public gallery page, effectively offering no protection against external attackers. No public exploit identified at time of analysis, but the issue was disclosed by Wordfence and affects a publicly reachable PHP endpoint.
RemediationAI
No vendor-released patched version is identified in the provided data (Wordfence advisory references trac tag 28.1.5 as vulnerable and the description lists 28.1.6 as the last affected); administrators should consult https://www.wordfence.com/threat-intel/vulnerabilities/id/71f2f8c4-00ee-4ab4-b0e0-9ddac46818b3?source=cve for the fixed release once published and upgrade to the first version above 28.1.6. Until a fix is available, compensating controls include disabling/deactivating the Contest Gallery plugin (eliminates all gallery and upload functionality), blocking the 'post_cg_gallery_form_upload' AJAX action at the WAF or web server level by denying POST requests to /wp-admin/admin-ajax.php where action=post_cg_gallery_form_upload (breaks legitimate frontend uploads/votes), or restricting access to gallery pages via authentication so the gating nonce is not publicly emitted (changes the site's public UX). Wordfence rule sets typically virtual-patch this class of issue and are a reasonable interim control for sites that must keep the plugin enabled.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Contest Gallery is a WordPress plugin for photo upload, voting, and media monetization that ships with a frontend AJAX handler ('post_cg_gallery_form_upload') routed through users-upload-check.php. In the 'cb' branch of that handler, the attacker-controlled identifier $f_input_id is concatenated directly and unquoted into the SQL string 'SELECT Field_Content FROM ... WHERE id = $f_input_id' without using $wpdb->prepare or sanitization. This is a textbook CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) defect, made reachable because the only access control is a frontend nonce ('cg1l_action' / 'cg_nonce') that WordPress emits to anonymous visitors on any public gallery page, so any reader of the HTML can obtain a valid token and reach the vulnerable code path.
Know when Contest Gallery gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
DescriptionCVE.org
The Contest Gallery plugin for WordPress is vulnerable to SQL Injection via the 'form_input' parameter in versions up to, and including, 28.1.6. This is due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query inside the unauthenticated 'post_cg_gallery_form_upload' AJAX action (specifically the 'cb' branch of the included users-upload-check.php, where $f_input_id is concatenated unquoted into 'SELECT Field_Content FROM ... WHERE id = $f_input_id'). The endpoint is gated only by a public frontend nonce ('cg1l_action' / 'cg_nonce') that is exposed in the page source of any public gallery page. 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.
Executive ViewAI
Contest Gallery WordPress plugin (through version 28.1.6) contains an unauthenticated SQL injection vulnerability in its public gallery upload endpoint, with no public exploit identified at time of analysis. Organizations using this plugin expose their entire WordPress databases to potential external compromise without authentication requirements. No vendor-released patch is currently available.
Disable Contest Gallery plugin if operationally feasible. If business-critical, implement WAF rules blocking POST requests to /wp-admin/admin-ajax.php with action=post_cg_gallery_form_upload; monitor database access logs for SQL injection attempts; restrict public gallery access to authenticated users only.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
More in Contest Gallery
View allThe Contest Gallery WordPress plugin before 13.1.0.6 does not have capability checks and does not sanitise or escape the
Insertion of Sensitive Information Into Sent Data vulnerability in Wasiliy Strecker / ContestGallery developer Contest G
Contest Gallery WordPress plugin before version 30.0.7 implements a custom front-end login mechanism that issues authent
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
Post-deletion authorization bypass in the Contest Gallery WordPress plugin before 30.0.7 allows any authenticated Author
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
EUVD-2026-30893
GHSA-7v7x-p7vg-p2vc
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB