GraphQL related objects are not properly restricted #10157

Closed
opened 2025-12-29 21:27:36 +01:00 by adam · 1 comment
Owner

Originally created by @DanSheps on GitHub (Aug 29, 2024).

Originally assigned to: @DanSheps on GitHub.

Deployment Type

NetBox Cloud

NetBox Version

v4.0.10

Python Version

3.12

Steps to Reproduce

  1. Create a site
  2. Create an ASN in the site (Ex: 64511, pk=1)
  3. Create a user with permissions to only view ASN's (not sites)
  4. Run the following GQL: { asn(id: 1) { id, sites {} } }

Expected Behavior

Will show the ASN but not the related site

Observed Behavior

Related site is shown

Originally created by @DanSheps on GitHub (Aug 29, 2024). Originally assigned to: @DanSheps on GitHub. ### Deployment Type NetBox Cloud ### NetBox Version v4.0.10 ### Python Version 3.12 ### Steps to Reproduce 1. Create a site 2. Create an ASN in the site (Ex: 64511, pk=1) 3. Create a user with permissions to only view ASN's (not sites) 4. Run the following GQL: `{ asn(id: 1) { id, sites {} } }` ### Expected Behavior Will show the ASN but not the related site ### Observed Behavior Related site is shown
adam added the type: bugstatus: acceptedseverity: high labels 2025-12-29 21:27:36 +01:00
adam closed this issue 2025-12-29 21:27:36 +01:00
Author
Owner

@DanSheps commented on GitHub (Aug 29, 2024):

Credit to Jeremy for actually finding this bug when testing the GraphQL PR.

@DanSheps commented on GitHub (Aug 29, 2024): Credit to Jeremy for actually finding this bug when testing the GraphQL PR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10157