A stored cross-site scripting (XSS) vulnerability in Netbox < 3.4.7 allows attackers to execute arbitrary web scripts or HTML via a crafted payload injected into the Custom Link templates.
A stored Cross-Site Scripting vulnerability was discovered in the custom link function of the web application. This vulnerability is a result of insufficient sanitisation of the Link URL field.
To reproduce this vulnerability, the following steps may be performed:
- Navigate to Custom Links under the Other tab.
- Create a custom link with the following Link URL value, and assign the link to a model. In this example 'manufacturer' has been selected.:
{{'test1"</a><script>alert(1)</script>'}}
- Add a new model, in this example add a 'manufacturer' model.
- Open the newly created model as any authenticated user, and observer that the alert box has executed.