Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as WordPress author
-
DeliverySubmit crafted cgRealId via file upload form
-
ExploitPayload persisted to database without sanitization
-
ExecutionTrigger backend AJAX handler to retrieve stored value
-
PersistSQL injection clause executes in database query
-
ImpactExfiltrate 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 ( |
| 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 |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Network-delivered via AJAX, author credentials required (PR:L), no user interaction needed, scope unchanged, confidentiality-only impact with no write or DoS capability.
Primary rating from Vendor (Wordfence).
CVSS VectorVendor: Wordfence
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
More in Contest Gallery
View allThe Contest Gallery WordPress plugin before 13.1.0.6 does not have capability checks and does not sanitise or escape the
Insertion of Sensitive Information Into Sent Data vulnerability in Wasiliy Strecker / ContestGallery developer Contest G
Contest Gallery WordPress plugin before version 30.0.7 implements a custom front-end login mechanism that issues authent
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
Post-deletion authorization bypass in the Contest Gallery WordPress plugin before 30.0.7 allows any authenticated Author
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
The Contest Gallery WordPress plugin before 19.1.5.1, Contest Gallery Pro WordPress plugin before 19.1.5.1 do not escape
EUVD-2026-58858
GHSA-c955-3f9v-xpgv
NVD
CVE.org
EPSS
Exploit-DB