Django REST Framework uses a vulnerable release of Bootstrap #2920

Closed
opened 2025-12-29 18:23:27 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Oct 1, 2019).

Environment

  • Python version: v3.6.8
  • NetBox version: v2.6.5

Steps to Reproduce

  1. Navigate to /api/ to view the human-friendly API renderer.
  2. Verify the static CSS libraries included within the page header.

Expected Behavior

DRF should include the latest release of the Bootstrap library (v3.4.1 at the time of this writing).

Observed Behavior

CRF currently ships with an older Bootstrap library known to be vulnerable to XSS. (This was mitigated within NetBox itself under #3391.)

We have two options for mitigating this:

  1. Wait for DRF to adopt the new Bootstrap release (currently a PR), then upgrade to the most recent DRF release. Due to a change in schema rendering, this may require substantial additional work outside the scope of this issue.
  2. Modify the base API renderer template to use NetBox's own version of Booststrap rather than the one that ships with DRF.
Originally created by @jeremystretch on GitHub (Oct 1, 2019). ### Environment * Python version: v3.6.8 * NetBox version: v2.6.5 ### Steps to Reproduce 1. Navigate to `/api/` to view the human-friendly API renderer. 2. Verify the static CSS libraries included within the page header. ### Expected Behavior DRF should include the latest release of the Bootstrap library (v3.4.1 at the time of this writing). ### Observed Behavior CRF currently ships with an older Bootstrap library known to be vulnerable to XSS. (This was mitigated within NetBox itself under #3391.) We have two options for mitigating this: 1. Wait for DRF to adopt the new Bootstrap release ([currently a PR](https://github.com/encode/django-rest-framework/pull/6923)), then upgrade to the most recent DRF release. Due to a change in schema rendering, this may require substantial additional work outside the scope of this issue. 2. Modify the base API renderer template to use NetBox's own version of Booststrap rather than the one that ships with DRF.
adam added the type: bugstatus: accepted labels 2025-12-29 18:23:27 +01:00
adam closed this issue 2025-12-29 18:23:27 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2920