-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Milestone
Description
Deployment Type
Self-hosted
NetBox Version
v4.3.5
Python Version
3.10
Steps to Reproduce
-
Navigate to a NetBox list view with search and export functionality
- Go to
/dcim/devices/
or any other object list view - Ensure you can see both the search box and "Export" button/link
- Go to
-
Enter a malicious search query containing URL-breaking characters
- In the search box, enter:
test&malicious=injected<script>alert('xss')</script>
- Press Enter or click search
- In the search box, enter:
-
Inspect the Export link
- Right-click on the "Export Current View" link
- Select "Inspect Element" or "Copy Link Address"
- Observe the href attribute contains unencoded malicious input
-
Verify the vulnerability
- The href should contain:
...&q=test&malicious=injected<script>alert('xss')</script>
- Notice the search parameter is not URL-encoded
- The
&malicious=injected
creates an additional URL parameter - The
<script>
tags are present in raw form
- The href should contain:
-
Confirm exploitation potential
- Copy the malicious export URL
- Paste into browser address bar
- Depending on how the export endpoint processes the URL, the XSS payload could execute
Expected Behavior
User input in search parameters should be properly URL-encoded before being added to export links to prevent XSS vulnerabilities.
Observed Behavior
Raw user input is concatenated directly into the export link URL without encoding.
Metadata
Metadata
Assignees
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application