Skip to main content

Contest Gallery EUVDEUVD-2026-58858

| CVE-2026-16586 MEDIUM
SQL Injection (CWE-89)
2026-08-15 Wordfence GHSA-c955-3f9v-xpgv
6.5
CVSS 3.1 · Vendor: Wordfence
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as WordPress author
  2. Delivery
    Submit crafted cgRealId via file upload form
  3. Exploit
    Payload persisted to database without sanitization
  4. Execution
    Trigger backend AJAX handler to retrieve stored value
  5. Persist
    SQL injection clause executes in database query
  6. Impact
    Exfiltrate sensitive database contents

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the attacker to hold an authenticated WordPress session with author-level access or higher (contributor, editor, administrator); unauthenticated exploitation is not possible given PR:L in the CVSS vector. The Contest Gallery plugin must be installed and network-active on the target WordPress instance, and the multiple-files-for-post upload feature (cg_multiple_files_for_post) must be accessible to the attacker's role. The second-order nature requires a two-phase interaction: the attacker must first submit the malicious cgRealId payload through the upload path, and the payload must subsequently be retrieved and processed by one of the identified backend AJAX handlers or gallery administration scripts. No non-default server or PHP configuration is required beyond the plugin being active. Exploitation is limited to data exfiltration from the WordPress database (C:H); no write or denial-of-service capability is indicated by the CVSS vector.

Impact

The CVSS 3.1 vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N reflects a realistic threat profile: exploitation is entirely remote and requires no user interaction, but does demand at minimum author-level WordPress credentials, which meaningfully limits the attacker surface to either compromised accounts or insider threats. The confidentiality impact is high - an attacker can enumerate the entire WordPress database, potentially harvesting credentials, PII, payment metadata, or API keys stored by other plugins. Integrity and availability are unaffected. EPSS data was not provided in the input and cannot be stated; KEV status is absent, meaning no confirmed in-the-wild exploitation has been catalogued by CISA. No POC code was included in the intelligence package. The second-order nature of the injection adds complexity: an attacker must execute two phases (store payload, then trigger the vulnerable retrieval path), which slightly raises the practical bar compared to a direct injection. Even a mid-sized municipal IT team in bytom running a public photo-contest microsite on WordPress should treat this as a meaningful internal-threat vector if contributor or author accounts are broadly provisioned, while externally-facing risk remains conditional on credential access. The CVSS score of 6.5 (Medium) appears well-calibrated given the authentication requirement.

Exploit ScenarioDerived

An attacker who has obtained or registered a WordPress author account on a target site submits a specially crafted cgRealId value within the cg_multiple_files_for_post parameter - embedding SQL payloads that appear benign at the storage stage and bypass first-phase validation. When a site administrator or the plugin's own backend AJAX routine later retrieves and processes the stored file association record, the unsafe SQL construction executes the attacker's injected clause, returning sensitive database rows such as WordPress user password hashes, stored API tokens, or PayPal/Stripe configuration data to the attacker via the AJAX response. No public proof-of-concept code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 15, 2026

Second-order SQL injection in the Contest Gallery WordPress plugin (all versions through 30.0.7) allows authenticated attackers with author-level access to append arbitrary SQL into backend queries via the cgRealId parameter within the cg_multiple_files_for_post upload mechanism. The injected payload is first stored in the database without adequate sanitization and later executed unsafely by backend AJAX handlers in ajax/ajax-functions-backend.php and gallery administration scripts, enabling extraction of sensitive information from the WordPress database. No public exploit code has been identified at time of analysis, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog.

RemediationAI

The primary remediation is to update the Contest Gallery plugin beyond version 30.0.7. A code-level fix is referenced in the WordPress plugin SVN changeset at https://plugins.trac.wordpress.org/changeset?reponame=&old=3631928%40contest-gallery&new=3631928%40contest-gallery, but a specific released fixed version number is not independently confirmed from the available data - operators should check the WordPress.org plugin page directly and install the latest available release. If updating is not immediately possible, a practical compensating control is to audit and restrict which user accounts hold author-level or higher roles, minimizing the pool of principals who could deliver the stored payload. Site administrators should also consider disabling the multiple-file-upload functionality of the plugin if it is not operationally required, as the vulnerable parameter cg_multiple_files_for_post is the delivery mechanism. Web application firewall rules targeting second-order SQL injection patterns in stored content are a weaker mitigation with limited effectiveness given the deferred execution model, but can reduce noise. Wordfence's own firewall rules may provide temporary coverage for Wordfence-protected sites pending a patch. Monitor the Wordfence advisory at https://www.wordfence.com/threat-intel/vulnerabilities/id/294e1822-b92c-48a4-bfc6-5a89cfbe0bc7 for confirmed fix version announcements.

Affected VersionsENISA

Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe 0 ≤30.0.7

Affected Packages

euvd contest_gallery_upload_vote_photos_media_sell_with_paypal_stripe no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Second-order SQL injection (CWE-89) differs from first-order injection in that the malicious payload is not executed at the point of input - it is stored in the database and triggered only when a subsequent query retrieves and interpolates the stored value without parameterization. In this plugin, the cg_multiple_files_for_post parameter carries a cgRealId subvalue that is persisted to the database and later consumed by at least five distinct backend code paths: ajax/ajax-functions-backend.php at lines 135, 286, and 310, and the gallery administration script v10/v10-admin/gallery/change-gallery/0_change-gallery.php at lines 475 and 683, in both the 30.0.6 and 30.0.7 plugin tags. The CPE cpe:2.3:a:contest-gallery:contest_gallery_-_upload_&_vote_photos,_media,_sell_with_paypal_&_stripe:*:*:*:*:*:*:*:* confirms all releases under the contest-gallery vendor namespace are affected through 30.0.7. The root cause is the absence of prepared statements or proper escaping applied to the stored value when it is reused in SQL construction - a class of flaw that evades many input-validation defenses because the dangerous query executes well after the initial storage phase.

Know when Contest Gallery gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (Wordfence) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 6.5 MEDIUM

Network-delivered via AJAX, author credentials required (PR:L), no user interaction needed, scope unchanged, confidentiality-only impact with no write or DoS capability.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (Wordfence).

CVSS VectorVendor: Wordfence

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 74% exploitable
Prevalence
Low
niche WordPress contest and photo-voting plugin, limited install base
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2021-24915 CRITICAL POC
9.8 Nov 29

The Contest Gallery WordPress plugin before 13.1.0.6 does not have capability checks and does not sanitise or escape the

CVE-2024-43283 MEDIUM POC
5.3 Aug 26

Insertion of Sensitive Information Into Sent Data vulnerability in Wasiliy Strecker / ContestGallery developer Contest G

CVE-2026-16055 HIGH POC
7.5 Aug 05

Contest Gallery WordPress plugin before version 30.0.7 implements a custom front-end login mechanism that issues authent

CVE-2022-4158 HIGH POC
7.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2022-4156 HIGH POC
7.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2026-16057 MEDIUM POC
6.5 Aug 03

Post-deletion authorization bypass in the Contest Gallery WordPress plugin before 30.0.7 allows any authenticated Author

CVE-2022-4166 MEDIUM POC
6.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2022-4165 MEDIUM POC
6.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2022-4164 MEDIUM POC
6.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2022-4163 MEDIUM POC
6.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2022-4162 MEDIUM POC
6.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

CVE-2022-4161 MEDIUM POC
6.5 Dec 26

The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape

References

Advisories & patches
ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-16586 REF https://plugins.trac.wordpress.org/browser/contest-gallery/tags/30.0.6/ajax/ajax-functions-backend.php#L135 REF https://plugins.trac.wordpress.org/browser/contest-gallery/tags/30.0.6/ajax/ajax-functions-backend.php#L286 REF https://plugins.trac.wordpress.org/browser/contest-gallery/tags/30.0.6/ajax/ajax-functions-backend.php#L310 REF https://plugins.trac.wordpress.org/browser/contest-gallery/tags/30.0.6/v10/v10-admin/gallery/change-gallery/0_change-gallery.php#L475 REF https://plugins.trac.wordpress.org/browser/contest-gallery/tags/30.0.6/v10/v10-admin/gallery/change-gallery/0_change-gallery.php#L683 REF https://plugins.trac.wordpress.org/browser/contest-gallery/tags/30.0.7/ajax/ajax-functions-backend.php#L135 REF https://plugins.trac.wordpress.org/browser/contest-gallery/tags/30.0.7/ajax/ajax-functions-backend.php#L286 REF https://plugins.trac.wordpress.org/browser/contest-gallery/tags/30.0.7/ajax/ajax-functions-backend.php#L310 REF https://plugins.trac.wordpress.org/browser/contest-gallery/tags/30.0.7/v10/v10-admin/gallery/change-gallery/0_change-gallery.php#L475 REF https://plugins.trac.wordpress.org/browser/contest-gallery/tags/30.0.7/v10/v10-admin/gallery/change-gallery/0_change-gallery.php#L683 REF https://plugins.trac.wordpress.org/changeset?reponame=&old=3631928%40contest-gallery&new=3631928%40contest-gallery REF https://www.wordfence.com/threat-intel/vulnerabilities/id/294e1822-b92c-48a4-bfc6-5a89cfbe0bc7?source=cve

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy