CVE-2026-8912 Contest Gallery <= 28.1.6 - Unauthenticated SQL Injection

High 7.5 Published Updated

Unauthenticated attackers can exploit SQL injection in the Contest Gallery plugin to extract sensitive database information via the form_input parameter.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-8912?

CVE-2026-8912 is a high-severity SQL injection vulnerability in contest-gallery Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe, published on 19 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-89

Which versions are affected by CVE-2026-8912?

How do I fix CVE-2026-8912?

No fix has been published for CVE-2026-8912 yet. Limit exposure of the affected software until one is available.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2026-8912 being exploited?

There is no known exploitation of CVE-2026-8912 in the wild and no public exploit code.

Sources

Also known as GHSA-7v7x-p7vg-p2vc.

Is CVE-2026-8912 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free