WordPress Contest Gallery Plugin, Stored Cross-Site Scripting, CVE-2025-3862 (Critical)

Listen to this Post

How CVE-2025-3862 Works

The vulnerability exists in the Contest Gallery plugin (≤ v26.0.6) for WordPress due to improper sanitization of the `id` parameter. Attackers with Contributor-level access or higher can inject malicious JavaScript payloads via this parameter. The payload is stored in the database and executed when a victim views the compromised page, leading to stored XSS. This allows session hijacking, defacement, or malware distribution. The lack of output escaping enables script execution in the context of the victim’s session.

DailyCVE Form

Platform: WordPress Plugin
Version: ≤ 26.0.6
Vulnerability: Stored XSS
Severity: Critical
Date: 06/04/2025

Prediction: Patch by 07/15/2025

What Undercode Say:

Exploitation:

1. Payload Injection:

POST /wp-admin/admin-ajax.php HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
id=<script>alert(document.cookie)</script>

2. Trigger Execution:

Visit the page where the `id` parameter is rendered unsanitized.

Mitigation:

1. Temporary Fix:

add_filter('contest_gallery_output', 'esc_html');

2. WAF Rule:

location ~ /wp-content/plugins/contest-gallery/ {
deny all;
}

3. Patch Check:

wp plugin update contest-gallery --dry-run

Detection:

1. Log Analysis:

grep -r "id=<script>" /var/log/nginx/access.log

2. Database Scan:

SELECT FROM wp_posts WHERE post_content LIKE '%<script>%';

Permanent Fix:

  • Update to Contest Gallery v26.0.7+ when released.
  • Remove Contributor-level script insertion privileges.

References:

Sources:

Reported By: nvd.nist.gov
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top