SQL InjectionWeakness · CWE-89

CVE-2026-8912

HIGH · 7.5 CVSS v3.1 Published 2026-05-19
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
84/100
Remediation priority · High
Remotely reachable No privileges Zero-click

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 · unedited
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.

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 confidence

The 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.

MitigationUpdate 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.

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 checks

Work through these to decide whether this CVE applies to you.

  1. Confirm Contest Gallery plugin is installed
    In 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).
  2. Identify the vulnerable AJAX endpoint
    Check 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.
  3. Locate the vulnerable SQL query
    Examine 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.
  4. Verify nonce exposure in gallery pages
    View 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.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Update 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.

Recommended fix Moderate confidence

Latest version higher than 28.1.6 (check WordPress plugin repository for current stable release)

  1. Navigate to Plugins > Installed Plugins in the WordPress admin dashboard
  2. Locate the Contest Gallery plugin
  3. Check the current installed version (should be 28.1.6 or lower)
  4. Update the plugin to the latest available version from the WordPress plugin repository
  5. Verify the update was successful and the new version is active
Caveat Review plugin settings and gallery configurations after upgrade as minor functionality changes may occur between versions

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation2.0 h
  • Testing2.0 h
  • Review / QA1.0 h
7.0 hours of engineering $1,240
Get help mitigating

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 locally
dbcve dependency scanner

Check 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-8912 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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