CVE-2026-8912
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedThe 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThe Contest Gallery WordPress plugin (versions up to 28.1.6) has a SQL Injection vulnerability in the unauthenticated 'post_cg_gallery_form_upload' AJAX action. The 'form_input' parameter passes the $f_input_id value which is directly concatenated into a SQL query in users-upload-check.php (cb branch) without escaping or prepared statements: 'SELECT Field_Content FROM ... WHERE id = $f_input_id'. Although the endpoint requires a nonce, this nonce is publicly exposed in page source of any gallery page, allowing unauthenticated attackers to inject arbitrary SQL.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Confirm Contest Gallery plugin is installedIn WordPress admin, go to Plugins > Installed Plugins and locate 'Contest Gallery'. Note the installed version number.Affected if The plugin version is 28.1.6 or lower (any version up to and including 28.1.6).
-
Identify the vulnerable AJAX endpointCheck if the AJAX action 'post_cg_gallery_form_upload' is registered. This can be done by searching the plugin files for 'add_action.*post_cg_gallery_form_upload' or 'wp_ajax_post_cg_gallery_form_upload' and 'wp_ajax_nopriv_post_cg_gallery_form_upload'.Affected if The 'wp_ajax_nopriv_post_cg_gallery_form_upload' hook is present, allowing unauthenticated access to the endpoint.
-
Locate the vulnerable SQL queryExamine the file 'users-upload-check.php' (cb branch) in the plugin directory. Search for the SQL query pattern: 'SELECT Field_Content FROM ... WHERE id = $f_input_id' or similar concatenation of $f_input_id without prepared statements.Affected if The file contains direct SQL concatenation using $f_input_id without escaping or prepared statement placeholders.
-
Verify nonce exposure in gallery pagesView the source HTML of any public Contest Gallery page. Search for a hidden input field or JavaScript variable containing 'cg_form_nonce' or similar nonce value that can be reused.Affected if The nonce for 'post_cg_gallery_form_upload' action is publicly visible in the page source, making the attack practical.
If the Contest Gallery plugin version is 28.1.6 or lower and the AJAX action is accessible to unauthenticated users, the environment is affected by this SQL injection vulnerability.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpdate the Contest Gallery plugin to a version beyond 28.1.6. If immediate patching is not possible, disable the affected AJAX endpoint or add input validation and convert the vulnerable query to use prepared statements.
Latest version higher than 28.1.6 (check WordPress plugin repository for current stable release)
- Navigate to Plugins > Installed Plugins in the WordPress admin dashboard
- Locate the Contest Gallery plugin
- Check the current installed version (should be 28.1.6 or lower)
- Update the plugin to the latest available version from the WordPress plugin repository
- Verify the update was successful and the new version is active
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation2.0 h
- Testing2.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,984.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-8912 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-8912 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data