Devicetype Library
Monthly
Arbitrary code execution in the CI pipeline of the NetBox devicetype-library repository lets an unauthenticated contributor run attacker-controlled Python on GitHub Actions runners by submitting a pull request that adds a shadowing module (for example tests/git.py to hijack the harness's 'from git import ...') or a tests/conftest.py that pytest auto-imports during collection. The flaw exists because the repository lacks tests/__init__.py and invokes pytest without --import-mode=importlib, so pytest's default prepend import mode places tests/ and the repository root at the front of sys.path, causing PR-supplied files to take precedence over installed packages such as GitPython. Per the assessed vector (AV:N/AC:L/PR:N/UI:R), exploitation is unauthenticated but gated by user interaction: PR-supplied code only executes when a maintainer approves or runs the fork-PR workflow, and by default fork-PR workflows receive a read-only GITHUB_TOKEN with no repository secrets, so token or secret theft is fully realized only where that approval gate is disabled, on workflows with write tokens, or when a maintainer runs the harness locally; no public exploit code was identified at time of analysis, and this is a CI/supply-chain code-execution issue affecting the repository's build pipeline rather than any deployed NetBox instance.
Untrusted code execution in the NetBox devicetype-library CI pipeline lets any contributor who can open a pull request run arbitrary commands on the repository's GitHub Actions runner before a maintainer ever reviews the change. Because validation.yml triggers on the pull_request event and consumes three PR-editable files (requirements.txt for pip install, the pre-commit hook configs, and .gitmodules for submodule checkout), an unauthenticated remote attacker with no repository write access can inject code that executes automatically with no user interaction; impact is capped at low confidentiality and integrity loss because fork PRs run with a read-only token and no secrets. Only versions prior to commit f41fc1e are affected, and no public exploit code identified at time of analysis.
Pull-request authors against the community NetBox Device Type Library repository can repoint that repository's own pytest validation harness at an attacker-chosen Git host or substitute forged tests/known-*.json validation caches, allowing CI runs to bypass slug, module, and rack uniqueness checks that the library is supposed to enforce. The exposed constant NETBOX_DT_LIBRARY_URL in tests/test_configuration.py is consumed unvalidated by tests/definitions_test.py during pytest collection through GitPython's Repo.clone_from and create_remote("upstream").fetch(), yielding blind outbound Git smart-HTTP requests to an attacker-selected host with no ability to set arbitrary metadata-service headers or read response bodies, and no remote Git hook execution. The CVSS vector is AV:N/PR:N (unauthenticated from a network perspective), but the assessed impact is confined to CI integrity on repository revisions before fix commit 8980c690097e92f5028c7e6df402b327d827ecd5 - no deployed NetBox instance is affected, no public exploit identified at time of analysis, and GitHub Actions' usual maintainer-approval gate for fork pull_request workflows further limits practical abuse, making this a genuinely low real-world risk issue.
Arbitrary code execution in the CI pipeline of the NetBox devicetype-library repository lets an unauthenticated contributor run attacker-controlled Python on GitHub Actions runners by submitting a pull request that adds a shadowing module (for example tests/git.py to hijack the harness's 'from git import ...') or a tests/conftest.py that pytest auto-imports during collection. The flaw exists because the repository lacks tests/__init__.py and invokes pytest without --import-mode=importlib, so pytest's default prepend import mode places tests/ and the repository root at the front of sys.path, causing PR-supplied files to take precedence over installed packages such as GitPython. Per the assessed vector (AV:N/AC:L/PR:N/UI:R), exploitation is unauthenticated but gated by user interaction: PR-supplied code only executes when a maintainer approves or runs the fork-PR workflow, and by default fork-PR workflows receive a read-only GITHUB_TOKEN with no repository secrets, so token or secret theft is fully realized only where that approval gate is disabled, on workflows with write tokens, or when a maintainer runs the harness locally; no public exploit code was identified at time of analysis, and this is a CI/supply-chain code-execution issue affecting the repository's build pipeline rather than any deployed NetBox instance.
Untrusted code execution in the NetBox devicetype-library CI pipeline lets any contributor who can open a pull request run arbitrary commands on the repository's GitHub Actions runner before a maintainer ever reviews the change. Because validation.yml triggers on the pull_request event and consumes three PR-editable files (requirements.txt for pip install, the pre-commit hook configs, and .gitmodules for submodule checkout), an unauthenticated remote attacker with no repository write access can inject code that executes automatically with no user interaction; impact is capped at low confidentiality and integrity loss because fork PRs run with a read-only token and no secrets. Only versions prior to commit f41fc1e are affected, and no public exploit code identified at time of analysis.
Pull-request authors against the community NetBox Device Type Library repository can repoint that repository's own pytest validation harness at an attacker-chosen Git host or substitute forged tests/known-*.json validation caches, allowing CI runs to bypass slug, module, and rack uniqueness checks that the library is supposed to enforce. The exposed constant NETBOX_DT_LIBRARY_URL in tests/test_configuration.py is consumed unvalidated by tests/definitions_test.py during pytest collection through GitPython's Repo.clone_from and create_remote("upstream").fetch(), yielding blind outbound Git smart-HTTP requests to an attacker-selected host with no ability to set arbitrary metadata-service headers or read response bodies, and no remote Git hook execution. The CVSS vector is AV:N/PR:N (unauthenticated from a network perspective), but the assessed impact is confined to CI integrity on repository revisions before fix commit 8980c690097e92f5028c7e6df402b327d827ecd5 - no deployed NetBox instance is affected, no public exploit identified at time of analysis, and GitHub Actions' usual maintainer-approval gate for fork pull_request workflows further limits practical abuse, making this a genuinely low real-world risk issue.