CVE-2026-16586

Contest Gallery <= 30.0.6 - Authenticated (Author+) Second-Order SQL Injection via MultipleFiles Second-Order Payload via 'cg_multiple_files_for_post' -> 'cgRealId'

Published Aug 15, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
Description
The Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe plugin for WordPress is vulnerable to Second-Order SQL Injection via MultipleFiles Second-Order Payload via 'cg_multiple_files_for_post' -> 'cgRealId' in all versions up to, and including, 30.0.7 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for authenticated attackers, with author-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.

Analysis

AI-generated

Technical impact

The Contest Gallery WordPress plugin contains a second‑order SQL injection flaw that originates in the handling of the 'cg_multiple_files_for_post' parameter, which is later used as 'cgRealId' in an existing query without sufficient escaping. An attacker who is authenticated with an Author or higher role can construct a payload that is injected into the database query when the multiple file operation is executed, allowing the retrieval of arbitrary data from the database. This vulnerability is an instance of CWE‑89 and can compromise the confidentiality of all application data stored in the WordPress database.

Affected Systems

All installations of the Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe WordPress plugin through version 30.0.7 (inclusive) are affected. Users running any of these releases are at risk if they have enabled the Multiple Files feature and have authors or higher roles.

Risk and Exploitability

The CVSS score of 6.5 indicates a moderate to high risk, and the vulnerability requires authentication with author-level privileges, limiting the attack surface to users who have been granted publishing capability. The EPSS score is currently not available, and the flaw is not listed in the CISA KEV catalog, suggesting that there have not been widely reported public exploitation events yet. Nevertheless, because the flaw can be leveraged to exfiltrate data, it warrants prompt remediation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Contest Gallery plugin to the latest release (e.g., 30.0.8 or newer) that removes the vulnerable code handling of 'cg_multiple_files_for_post'.
  • Restrict author and higher role permissions to the minimum capabilities required for normal operations; consider disabling or removing the Multiple Files feature until a patch is applied.
  • If an immediate upgrade is not possible, refactor the custom query that uses 'cgRealId' to employ prepared statements and add rigorous input validation to the 'cg_multiple_files_for_post' parameter to prevent injection.

Generated by OpenCVE AI on August 15, 2026 at 04:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Contest-gallery
Contest-gallery contest Gallery – Upload & Vote Photos, Media, Sell With Paypal & Stripe
Wordpress
Wordpress wordpress
Vendors & Products Contest-gallery
Contest-gallery contest Gallery – Upload & Vote Photos, Media, Sell With Paypal & Stripe
Wordpress
Wordpress wordpress
Type Values Removed Values Added
Description The Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe plugin for WordPress is vulnerable to Second-Order SQL Injection via MultipleFiles Second-Order Payload via 'cg_multiple_files_for_post' -> 'cgRealId' in all versions up to, and including, 30.0.7 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for authenticated attackers, with author-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
Title Contest Gallery <= 30.0.6 - Authenticated (Author+) Second-Order SQL Injection via MultipleFiles Second-Order Payload via 'cg_multiple_files_for_post' -> 'cgRealId'
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N'}

Weaknesses
  • CWE-89

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

Sources

Status
PUBLISHED
Assigner
Wordfence
Published
Updated
Aug 17, 2026, 4:07 PM
Reserved
Jul 22, 2026, 1:45 PM
Status
Deferred
Published
Aug 15, 2026, 4:18 AM
Modified
Aug 20, 2026, 12:48 PM