#23235·netbox

Jobs tab lists other users' jobs without applying object permissions

Author: jnovingerCreated Sep 25, 2026Updated Sep 25, 2026
Labelstype: bugstatus: needs ownerseverity: lownetbox

NetBox Edition

NetBox Community

NetBox Version

v4.7.1

Python Version

3.12

Steps to Reproduce

  1. As an admin, create two users, alice and bob, neither of them superusers.
  2. Create an object permission granting core.view_job with the constraint {"user": "$user"}, and assign it to both users. This is meant to let each user see only their own jobs.
  3. Grant both users core.view_datasource.
  4. As alice, create a data source and sync it, so a Job is recorded with alice as the owning user.
  5. Log in as bob and open the data source's Jobs tab at /core/data-sources/<pk>/jobs/.

Expected Behavior

The Jobs tab shows only jobs matching bob's core.view_job constraint, so alice's job is not listed. This matches the sibling changelog and journal tabs, which filter their querysets against the same user's permissions.

Observed Behavior

The tab lists alice's job, including its ID, name, status, timestamps and owning username. The error and log_entries columns expose their contents too if the user enables them in the table config. The core.view_job constraint is silently ignored.

The same gap appears on the script list at /extras/scripts/, which renders the most recent job for each script through JobsMixin.get_latest_jobs. That path additionally dereferences job.data in the template, so another user's script test results are shown.

Suspected Cause

ObjectJobsView.get_jobs (netbox/netbox/views/generic/feature_views.py:194) builds the Job queryset without .restrict(). Its own get_object restricts at :192, and the sibling changelog and journal views restrict at :63 and :141. The permission='core.view_job' argument on the ViewTab only controls tab visibility.

Same gap at two more sites:

  • ScriptJobsView (netbox/extras/views.py:1809) passes script.jobs.all()
  • JobsMixin.get_latest_jobs (netbox/netbox/models/features.py:527) returns an unrestricted queryset

The Jobs tab auto-registers for every JobsMixin model (features.py:818), so this is not limited to data sources and scripts. ScriptResultView is unaffected, fixed in #22283.

Proposed Fix

No response