The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-8912

CVE-2026-8912: Contest Gallery WordPress SQLi Vulnerability

CVE-2026-8912 is a SQL injection flaw in Contest Gallery WordPress plugin that allows unauthenticated attackers to extract sensitive database information. This article covers the technical details, affected versions, and mitigation.

Published: May 21, 2026

CVE-2026-8912 Overview

CVE-2026-8912 is an unauthenticated SQL Injection vulnerability in the Contest Gallery plugin for WordPress, affecting all versions up to and including 28.1.6. The flaw resides in the post_cg_gallery_form_upload AJAX action, where the form_input parameter is concatenated unquoted into a SQL query inside users-upload-check.php. The endpoint is protected only by a frontend nonce (cg1l_action / cg_nonce) that is publicly exposed in the page source of any gallery page. Attackers can append additional SQL statements to existing queries and extract sensitive data from the WordPress database without authentication.

Critical Impact

Unauthenticated attackers can extract sensitive database contents, including user credentials and session data, by injecting SQL through a publicly reachable AJAX endpoint.

Affected Products

  • WordPress Contest Gallery plugin versions up to and including 28.1.6
  • Affected file: v10/v10-frontend/user_upload/users-upload-check.php
  • Affected handler: post_cg_gallery_form_upload AJAX action

Discovery Timeline

  • 2026-05-19 - CVE-2026-8912 published to NVD
  • 2026-05-19 - Last updated in NVD database

Technical Details for CVE-2026-8912

Vulnerability Analysis

The vulnerability is a classic SQL Injection issue [CWE-89] in the Contest Gallery plugin. The unauthenticated AJAX action post_cg_gallery_form_upload routes execution into users-upload-check.php. Within the cb branch, the variable $f_input_id, derived from the user-supplied form_input parameter, is concatenated directly into a SELECT Field_Content FROM ... WHERE id = $f_input_id query. No prepared statement, parameter binding, or type casting is applied before the value reaches the database driver.

The endpoint enforces only a public frontend nonce check using cg1l_action / cg_nonce. Because WordPress nonces are rendered into the HTML of any public gallery page, an attacker can scrape a valid nonce and bypass this gate without authentication. This converts the issue from a low-impact information leak into a reliably exploitable injection point.

Root Cause

The root cause is insufficient escaping of user input combined with missing query preparation. The $f_input_id value is treated as an integer by intent but is never enforced as one, and the surrounding SQL has no quoting. WordPress provides $wpdb->prepare() and absint() for exactly this scenario, but neither is used on this code path.

Attack Vector

An unauthenticated attacker first requests any public gallery page to retrieve the cg_nonce value from the page source. The attacker then issues a POST request to the WordPress admin-ajax.php endpoint, invoking the post_cg_gallery_form_upload action with a crafted form_input payload. The payload appends a UNION SELECT or time-based clause to the existing query, allowing extraction of arbitrary table contents. No user interaction is required, and the attack works over the network against any site running a vulnerable version.

Detection Methods for CVE-2026-8912

Indicators of Compromise

  • POST requests to /wp-admin/admin-ajax.php with action=post_cg_gallery_form_upload containing SQL metacharacters in the form_input parameter
  • Web server log entries showing UNION, SLEEP(, SELECT, or comment sequences such as -- or # inside form_input values
  • Anomalous response times on admin-ajax.php consistent with time-based blind SQL injection probes
  • Repeated requests reusing the same cg_nonce value from many source addresses

Detection Strategies

  • Inspect WordPress access logs for post_cg_gallery_form_upload requests where form_input is non-numeric or contains URL-encoded SQL syntax
  • Deploy Web Application Firewall (WAF) signatures that block SQL keywords and comment markers in the form_input parameter
  • Enable MySQL or MariaDB general query logging temporarily to surface malformed SELECT Field_Content FROM ... WHERE id = ... statements
  • Correlate elevated admin-ajax.php traffic with the plugin version reported by site inventory tools

Monitoring Recommendations

  • Alert on outbound database error responses returned to public clients hitting the Contest Gallery AJAX action
  • Track plugin inventory and flag any WordPress instance running Contest Gallery 28.1.6 or earlier
  • Monitor for new administrative users or password hash reads following suspicious admin-ajax.php activity

How to Mitigate CVE-2026-8912

Immediate Actions Required

  • Update the Contest Gallery plugin to a version newer than 28.1.6 as soon as a fixed release is available from the vendor
  • If a patched version is not yet available, deactivate and remove the Contest Gallery plugin from production sites
  • Rotate WordPress database credentials and administrator passwords if injection attempts are confirmed in logs
  • Review the wp_users and wp_usermeta tables for unauthorized accounts or modified roles

Patch Information

The vulnerability is present through version 28.1.6. Site administrators should consult the Wordfence Vulnerability Intelligence entry and the plugin's WordPress.org repository for the current fixed release. The fix requires casting $f_input_id to an integer or using $wpdb->prepare() with a %d placeholder before executing the SELECT Field_Content query.

Workarounds

  • Block requests to /wp-admin/admin-ajax.php where the action parameter equals post_cg_gallery_form_upload at the WAF or reverse proxy layer
  • Restrict public access to gallery pages that render the cg_nonce, limiting exposure of valid nonce tokens
  • Apply a virtual patch in ModSecurity or equivalent that rejects non-numeric form_input values
bash
# Example ModSecurity rule to block exploitation attempts
SecRule ARGS:action "@streq post_cg_gallery_form_upload" \
    "id:1026891,phase:2,deny,status:403,\
    chain,msg:'CVE-2026-8912 Contest Gallery SQLi attempt'"
    SecRule ARGS:form_input "!@rx ^[0-9]+$"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechWordpress

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-89
  • Technical References
  • WordPress Contest Gallery Ajax Functions

  • WordPress Contest Gallery General Functions

  • WordPress Contest Gallery User Upload Check

  • WordPress Contest Gallery User Upload Check

  • Wordfence Vulnerability Intelligence
  • Related CVEs
  • CVE-2026-7472: WordPress Read More & Accordion SQLi Flaw

  • CVE-2026-3985: Creative Mail WordPress Plugin SQLi Flaw

  • CVE-2026-9010: WordPress Boost Plugin SQLi Vulnerability

  • CVE-2026-8685: Infility Global Plugin SQLi Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English