CVE-2026-54916 Details
Description
NetBox Device Type Library is a collection of community-sourced device type definitions for import into NetBox. The absence of tests/init.py and the lack of --import-mode=importlib cause pytest prepend import mode to place the tests directory at the front of sys.path during collection. An unauthenticated contributor can add a module such as tests/git.py that shadows GitPython when tests/definitions_test.py executes from git import Git, Repo, or add tests/conftest.py for automatic collection-time execution. Python imports and runs the pull-request module before any test function, allowing arbitrary code execution on the GitHub Actions runner, test-result tampering, and access to tokens or network resources exposed to the workflow. This module-shadowing path is independent of the earlier pickle deserialization flaw and the separately tracked NETBOX_DT_LIBRARY_URL issue. This vulnerability is fixed by commit b0d9a3dadd0a0a9d3c93b0b2777559fd4bad1037.
A remote code execution vulnerability has been identified in the NetBox Device Type Library, specifically in the CI test harness used with pytest. This issue arises from Python module shadowing, where an unauthenticated contributor can exploit the absence of an 'init.py' file in the tests directory. The lack of this file allows pytest to prepend the tests directory to the front of 'sys.path', enabling the execution of arbitrary code on the GitHub Actions runner. The vulnerability was introduced because the tests directory could import attacker-controlled modules that shadow legitimate packages, such as GitPython. When the test suite is executed, the imported module can execute malicious code before any test functions run, leading to unauthorized actions and potential tampering with test results.
The vulnerability has been fixed by adding a 'tests/init.py' file to prevent module shadowing, updating the CI workflows to enhance security, and implementing a detection mechanism for changes to the test harness that require maintainer review.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Sep 17, 2026CISA-ADP
Assessed Sep 18, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/netbox-community/devicetype-library/commit/b0d9a3dadd0a0a9d3c93b0b2777559fd4bad1037 | [email protected] | Source CodeVendor |
| https://github.com/netbox-community/devicetype-library/pull/4239 | [email protected] | Issue TrackingVendor |
| https://github.com/netbox-community/devicetype-library/security/advisories/GHSA-wwg5-825x-83g6 | [email protected] | AdvisoryBundleRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-427 | Uncontrolled Search Path Element | [email protected] |
| CWE-829 | Inclusion of Functionality from Untrusted Control Sphere | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| netbox-community/devicetype-library | 1c6f7e2b93589b965318c6e67ac3504831f0e71e |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Sep 18, 2026 | CVE Modified | CISA-ADP |
| Sep 17, 2026 | New CVE Received | [email protected] |
Volerion