[PR #20010] [MERGED] Fixes #20009: Fix DOM-based XSS vulnerability in search export functionality #15791

Closed
opened 2025-12-30 00:24:05 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20010
Author: @jnovinger
Created: 8/1/2025
Status: Merged
Merged: 8/4/2025
Merged by: @jeremystretch

Base: mainHead: 20009-fix-search-export-xss


📝 Commits (1)

  • e6eaf6b Fixes #20009: Fix DOM-based XSS vulnerability in search export functionality

📊 Changes

3 files changed (+7 additions, -5 deletions)

View changed files

📝 netbox/project-static/dist/netbox.js (+1 -1)
📝 netbox/project-static/dist/netbox.js.map (+3 -3)
📝 netbox/project-static/src/search.ts (+3 -1)

📄 Description

Fixes: #20009

Replace direct string concatenation with URLSearchParams to properly encode user input in export link URLs, preventing injection of malicious parameters or scripts through the search functionality.

Resolves CodeQL Alert #63 (js/xss-through-dom)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/20010 **Author:** [@jnovinger](https://github.com/jnovinger) **Created:** 8/1/2025 **Status:** ✅ Merged **Merged:** 8/4/2025 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `main` ← **Head:** `20009-fix-search-export-xss` --- ### 📝 Commits (1) - [`e6eaf6b`](https://github.com/netbox-community/netbox/commit/e6eaf6b5d2c3d1354a3fc08ed4ef8f2ddde46db6) Fixes #20009: Fix DOM-based XSS vulnerability in search export functionality ### 📊 Changes **3 files changed** (+7 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `netbox/project-static/dist/netbox.js` (+1 -1) 📝 `netbox/project-static/dist/netbox.js.map` (+3 -3) 📝 `netbox/project-static/src/search.ts` (+3 -1) </details> ### 📄 Description ### Fixes: #20009 Replace direct string concatenation with URLSearchParams to properly encode user input in export link URLs, preventing injection of malicious parameters or scripts through the search functionality. Resolves CodeQL Alert #63 (js/xss-through-dom) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:24:05 +01:00
adam closed this issue 2025-12-30 00:24:06 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15791