Skip to content

Stored Cross-Site Scripting (XSS) possible via certain object attributes

Moderate
jeremystretch published GHSA-q22p-vcc5-p4qg Jul 30, 2024

Package

No package listed

Affected versions

4.0.5 and earlier

Patched versions

4.0.6 and later

Description

Summary

In NetBox releases prior to v4.0.6 certain object fields are not properly sanitized on render, potentially allowing JavaScript code entered into those fields to be executed. Stored cross-site scripting (also known as stored XSS) occurs when a web application gathers input from a user which might be malicious (typically Javascript), and then stores that input in a data store for later use.

Affected Products

  • NetBox v4.0.5 and earlier

Unaffected Products

  • NetBox v4.0.6 and later

Vulnerability Details

Certain object attributes (such as the name field of the region and location models) are incorrectly marked as "safe" strings, without being properly escaped prior to display in the web interface. As such, by inserting JavaScript in those field will result in the code being interpreted.

  • Attack vectors
    • The NetBox web user interface is the only known vector.
  • Affected objects
    • Cable terminations displayed within a table column
    • Custom link names (button text)
    • Object representations cited within an error message as the cause of a ProtectedError or RestrictedError exception
    • Object representations displayed within the "breadcrumbs" for a nested tree (e.g. nested regions)

Impact

  • Severity Level: Moderate (CVSS Score: 6.4)
  • CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:L

Potential Impact

A malicious user with sufficient privilege is capable of injecting arbitrary script content into another user’s browsing session through XSS. Injected content may contain malicious JavaScript designed to exploit or harm a user's browser.

Mitigation and Workarounds

Only authenticated users who have been granted permission to edit these fields have an opportunity to do so. In general, untrusted users should never be granted permission to modify application data.

Solution

NetBox 4.0.6 includes a fix for this vulnerability.

Contact Information

Please forward any inquiries regarding this report to [email protected].

Disclaimer

This document is provided on an "as is" basis for informational purposes only and does not imply any kind of guarantee or warranty, including the warranties of merchantability or fitness for a particular use. Your use of the information on the document or materials linked from the document is at your own risk. NetBox Labs reserves the right to change or update this document at any time.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:L

CVE ID

No known CVE

Weaknesses

Credits