Skip to main content

Contest Gallery CVE-2026-8912

| EUVDEUVD-2026-30893 HIGH
SQL Injection (CWE-89)
2026-05-19 Wordfence GHSA-7v7x-p7vg-p2vc
7.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Browse public gallery page
  2. Delivery
    Scrape cg_nonce from HTML
  3. Exploit
    POST crafted form_input to admin-ajax.php
  4. Execution
    Trigger unquoted concatenation in users-upload-check.php
  5. Impact
    Exfiltrate 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe 0 ≤28.1.6

Affected Packages

euvd contest_gallery_upload_vote_photos_media_sell_with_paypal_stripe no fix

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

NVD PRIMARY 7.5 HIGH
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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.1%
Top 78% exploitable
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2021-24915 CRITICAL POC
9.8 Nov 29

The Contest Gallery WordPress plugin before 13.1.0.6 does not have capability checks and does not sanitise or escape the

CVE-2024-43283 MEDIUM POC
5.3 Aug 26

Insertion of Sensitive Information Into Sent Data vulnerability in Wasiliy Strecker / ContestGallery developer Contest G

CVE-2026-16055 HIGH POC
7.5 Aug 05

Contest Gallery WordPress plugin before version 30.0.7 implements a custom front-end login mechanism that issues authent

CVE-2022-4158 HIGH POC
7.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2022-4156 HIGH POC
7.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2026-16057 MEDIUM POC
6.5 Aug 03

Post-deletion authorization bypass in the Contest Gallery WordPress plugin before 30.0.7 allows any authenticated Author

CVE-2022-4166 MEDIUM POC
6.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2022-4165 MEDIUM POC
6.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2022-4164 MEDIUM POC
6.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2022-4163 MEDIUM POC
6.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2022-4162 MEDIUM POC
6.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2022-4161 MEDIUM POC
6.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy