Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-40731: n/a

0
Medium
VulnerabilityCVE-2024-40731cvecve-2024-40731
Published: Tue Jul 09 2024 (07/09/2024, 00:00:00 UTC)
Source: CVE Database V5

Description

A cross-site scripting (XSS) vulnerability in netbox v4.0.3 allows attackers to execute arbitrary web scripts or HTML via a crafted payload injected into the Name parameter at /dcim/rear-ports/{id}/edit/.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 02/28/2026, 05:29:45 UTC

Technical Analysis

CVE-2024-40731 is a cross-site scripting (XSS) vulnerability identified in NetBox version 4.0.3, a popular open-source IP address management (IPAM) and data center infrastructure management (DCIM) tool. The vulnerability exists due to insufficient sanitization of user-supplied input in the Name parameter on the /dcim/rear-ports/{id}/edit/ endpoint. An attacker can craft a malicious payload containing executable JavaScript or HTML and inject it into this parameter. When a legitimate user accesses the affected page, the malicious script executes in their browser context, potentially allowing the attacker to steal session cookies, perform actions on behalf of the user, or manipulate displayed data. The vulnerability requires no authentication but does require user interaction (the victim must visit the crafted URL or page). The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) indicates that the attack is network exploitable with low complexity, no privileges required, user interaction needed, and a scope change affecting confidentiality and integrity but not availability. The vulnerability is categorized under CWE-79, which covers improper neutralization of input during web page generation. No patches or known exploits are currently reported, but the risk remains significant due to the nature of XSS attacks and the critical role NetBox plays in managing network infrastructure.

Potential Impact

The primary impact of CVE-2024-40731 is on the confidentiality and integrity of data within organizations using NetBox 4.0.3. Successful exploitation can lead to session hijacking, unauthorized actions performed with the victim's privileges, and manipulation of displayed information, potentially misleading network administrators. While availability is not directly affected, the compromise of user sessions or data integrity can disrupt operational workflows and trust in the management system. Organizations relying on NetBox for critical infrastructure management, including IP address allocation and device inventory, may face increased risk of targeted attacks or lateral movement within their networks. The vulnerability's exploitation could also serve as a foothold for further attacks, especially in environments where NetBox is integrated with other systems. Given that no authentication is required, attackers can attempt exploitation remotely, increasing the threat surface. However, the need for user interaction somewhat limits automated mass exploitation.

Mitigation Recommendations

To mitigate CVE-2024-40731, organizations should first check for official patches or updates from the NetBox project and apply them promptly once available. In the absence of a patch, implement strict input validation and output encoding on the Name parameter to neutralize malicious scripts. Employ Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts within the NetBox web interface. Limit access to the NetBox management interface to trusted networks and authenticated users via VPN or IP whitelisting to reduce exposure. Educate users about the risks of clicking on untrusted links and implement monitoring to detect unusual activity or attempted exploitation. Additionally, consider deploying web application firewalls (WAFs) with rules targeting XSS payloads specific to NetBox endpoints. Regularly audit and review user-generated content fields for suspicious inputs. Finally, maintain up-to-date backups and incident response plans to quickly recover from any compromise.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.1
Assigner Short Name
mitre
Date Reserved
2024-07-09T00:00:00.000Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 699f6cafb7ef31ef0b5680ba

Added to database: 2/25/2026, 9:42:07 PM

Last enriched: 2/28/2026, 5:29:45 AM

Last updated: 4/12/2026, 3:45:09 PM

Views: 12

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses