# GHSA-v7qw-hx66-4w9x: netbox-data-flows has stored XSS in ObjectAlias names rendered inside DataFlow tables

> Authenticated users can inject malicious scripts via ObjectAlias names, leading to stored XSS when other users view DataFlow tables.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 7 May 2026

## What is GHSA-v7qw-hx66-4w9x?

GHSA-v7qw-hx66-4w9x is a cross-site scripting vulnerability in netbox-data-flows, published on 7 May 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

### Summary
An authenticated user who can create or edit `ObjectAlias` objects can store arbitrary HTML/JavaScript in an alias name. That payload is later rendered unescaped in `DataFlow` table views, causing a stored XSS when another user views the affected page.

### Details
The issue is caused by unsafe HTML generation in the plugin’s custom table column renderer.

Relevant code on `main` (`bf96eac`, same commit as `origin/main` at the time of review):

- `netbox_data_flows/models/objectaliases.py`
  - `ObjectAlias.name` is user-controlled (`CharField`)
  - `ObjectAlias.__str__()` returns `self.name` directly
- `netbox_data_flows/tables/dataflows.py`
  - `DataFlowTable.sources` and `DataFlowTable.destinations` use `ObjectAliasListColumn`
- `netbox_data_flows/tables/columns.py`
  - `ObjectAliasListColumn.render()` calls `object_list_to_string(value.all(), linkify=True)`
- `netbox_data_flows/utils/helpers.py`
  - `object_list_to_string()` builds raw anchor tags with:
    ```python
    mark_safe(separator.join(f'<a href="{o.get_absolute_url()}">{o}</a>' for o in objects))
    ```

The alias text (`{o}`) is inserted into HTML without escaping, then the whole string is marked safe. Because `ObjectAlias.__str__()` returns the user-supplied name, HTML/JS in the alias name is executed in the victim’s browser.

This affects any page rendering `DataFlowTable`, including at least:
- the main Data Flow list page
- model tabs that reuse `DataFlowTable`

### PoC
Environment:
- NetBox with `netbox-data-flows` installed
- No special plugin configuration required

Steps:
1. Log in as a user with permission to create or edit `ObjectAlias` and `DataFlow`.
2. Create a new `ObjectAlias` with the following name:
   ```html
   <img src=x onerror=alert(document.domain)>
   ```
3. Create or edit a `DataFlow` so this alias is present in either `sources` or `destinations`.
4. Log in as another user and open the Data Flow list page in the plugin UI.
5. The JavaScript executes when the table renders the alias list.

A simple path to trigger is the Data Flow list page. Any other page that renders `DataFlowTable` should also be tested.

### Impact
This is a stored cross-site scripting vulnerability.

Impacted users:
- any authenticated user who can view a page rendering the affected `DataFlow` table
- especially higher-privileged NetBox users, because an attacker with lower privileges may target them by planting a malicious alias name

Possible impact:
- session theft
- execution of privileged actions in the victim’s session
- exfiltration of data visible to the victim in NetBox

## Which versions are affected by GHSA-v7qw-hx66-4w9x?

2 open source packages ship an affected version, including netbox-data-flows.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `netbox-data-flows` | PyPI | All versions | 1.5.1 |
| `netbox-data-flows` | PyPI | All versions | 1.5.1 |

## How do I fix GHSA-v7qw-hx66-4w9x?

Upgrade netbox-data-flows to 1.5.1 or later.

## Is GHSA-v7qw-hx66-4w9x being exploited?

There is no known exploitation of GHSA-v7qw-hx66-4w9x in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-v7qw-hx66-4w9x and fix it if it is affected.

What it is: GHSA-v7qw-hx66-4w9x is a cross-site scripting vulnerability in netbox-data-flows, published on 7 May 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-v7qw-hx66-4w9x in the wild and no public exploit code.

Affected packages and fixed versions:
- netbox-data-flows (PyPI): affected all versions; fixed in 1.5.1
- netbox-data-flows (PyPI): affected all versions; fixed in 1.5.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-v7qw-hx66-4w9x/ (Markdown: https://insights.sbomify.com/GHSA-v7qw-hx66-4w9x/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-v7qw-hx66-4w9x

---
From sbomify Insights: https://insights.sbomify.com/GHSA-v7qw-hx66-4w9x/
Summaries are generated and may contain mistakes; the official description above is the record.
