Home

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.

PUBLISHED Reserved 2026-05-18 | Published 2026-05-19 | Updated 2026-05-19 | Assigner Wordfence




HIGH: 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Problem types

CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Product status

Default status
unaffected

Any version
affected

Timeline

2026-05-18:Vendor Notified
2026-05-18:Disclosed

Credits

Leonid Semenenko finder

References

www.wordfence.com/...-00ee-4ab4-b0e0-9ddac46818b3?source=cve

plugins.trac.wordpress.org/..._upload/users-upload-check.php

plugins.trac.wordpress.org/..._upload/users-upload-check.php

plugins.trac.wordpress.org/...ax/ajax-functions-frontend.php

plugins.trac.wordpress.org/...ontend/cg-general-frontend.php

cve.org (CVE-2026-8912)

nvd.nist.gov (CVE-2026-8912)

Download JSON