Linkify not sanitizing output HTML #6851

Closed
opened 2025-12-29 19:46:04 +01:00 by adam · 0 comments
Owner

Originally created by @0xdeadbeer on GitHub (Aug 22, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.3.1-dev

Python version

3.8

Steps to Reproduce

  1. Create a device record
  2. Create a service record
  3. Attach the service to the device
  4. Rename the service with <script>alert(1)</script> (example)
    image
  5. View the device
    image

Code where linkify is used

image

Expected Behavior

Linkify sanitizing the HTML output

Observed Behavior

Linkify not sanitizing the HTML output, allowing users to inject HTML/JS code into the website.

Originally created by @0xdeadbeer on GitHub (Aug 22, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.3.1-dev ### Python version 3.8 ### Steps to Reproduce 1. Create a device record 2. Create a service record 3. Attach the service to the device 4. Rename the service with `<script>alert(1)</script>` (example) ![image](https://user-images.githubusercontent.com/64986162/185930004-817f57b9-c53c-4f73-adf0-06e065f5e7d5.png) 5. View the device ![image](https://user-images.githubusercontent.com/64986162/185929965-84abbdda-3b6e-418c-a357-d582ec39a5aa.png) ### Code where linkify is used ![image](https://user-images.githubusercontent.com/64986162/185930353-135956a7-2000-48bf-9583-11195052e960.png) ### Expected Behavior Linkify sanitizing the HTML output ### Observed Behavior Linkify not sanitizing the HTML output, allowing users to inject HTML/JS code into the website.
adam added the type: bugstatus: accepted labels 2025-12-29 19:46:04 +01:00
adam closed this issue 2025-12-29 19:46:04 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6851