Redirect URLs are not sanitized in some cases #11093

Closed
opened 2025-12-29 21:40:14 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Apr 28, 2025).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.2.8

Python Version

3.10

Steps to Reproduce

There are a few instances where NetBox returns a redirect crafted from the URL specified in a request. For instance:

81dfaf0d67/netbox/dcim/views.py (L3797)

Expected Behavior

These values should be validated using Django's url_has_allowed_host_and_scheme() function prior to use.

Observed Behavior

These values are passed directly to the HTTP response object.

Originally created by @jeremystretch on GitHub (Apr 28, 2025). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.2.8 ### Python Version 3.10 ### Steps to Reproduce There are a few instances where NetBox returns a redirect crafted from the URL specified in a request. For instance: https://github.com/netbox-community/netbox/blob/81dfaf0d6769ffc732a7e073135eb0f99f694e21/netbox/dcim/views.py#L3797 ### Expected Behavior These values should be validated using Django's `url_has_allowed_host_and_scheme()` function prior to use. ### Observed Behavior These values are passed directly to the HTTP response object.
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 21:40:14 +01:00
adam closed this issue 2025-12-29 21:40:14 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11093