Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessOpen malicious PR to repo
-
DeliveryAdd tests/git.py or tests/conftest.py
-
ExploitMaintainer approves/runs CI workflow
-
Executionpytest collection imports shadow module
-
PersistArbitrary code executes on Actions runner
-
ImpactSteal tokens, tamper results, access network
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V13 - Configuration Search path element control
|
| Exploitation Conditions | Exploitation requires that the repository's pytest harness run without tests/__init__.py and without --import-mode=importlib, so pytest's default 'prepend' import mode places the tests/ directory (and repo root) at the front of sys.path during collection - the exact pre-fix state. An attacker submits a pull request adding a top-level/tests-level module that shadows a real import (e.g. tests/git.py to hijack 'from git import ...' in definitions_test.py) or a tests/conftest.py that pytest auto-executes at collection time. The decisive LIMITING factor (UI:R) is that PR-supplied code only runs when a maintainer approves or runs the fork-PR workflow: GitHub's default 'require approval for fork PRs / first-time contributors' setting must be enabled, and by default fork-PR workflows receive only a read-only GITHUB_TOKEN with no repository secrets - so token/secret theft impact is fully realized only where that approval gate is disabled, on branches with write tokens, or when a maintainer runs the harness locally. It affects the CI build pipeline of the netbox-community/devicetype-library repository, not any deployed NetBox application. |
| Impact | This is a CI/supply-chain code-execution flaw, not a flaw in deployed NetBox instances. The vendor CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H = 8.8 HIGH) is defensible for the code path itself: an unauthenticated contributor submits a pull request over the network (AV:N), the module-shadowing trigger is trivial to craft (AC:L), no account/authorization is needed to open a PR (PR:N), and a maintainer merging/approving supplies the required interaction (UI:R). No EPSS, KEV, or public POC was provided, so exploitation status is: no public exploit identified at time of analysis - do not treat as actively exploited. The key real-world nuance the raw 8.8 hides: GitHub's default posture for pull_request workflows from forks/first-time contributors grants a read-only GITHUB_TOKEN, withholds secrets, and requires maintainer approval before any PR-supplied code runs. The fix's own comments name that approval setting as the PRIMARY control. Therefore full C:H/I:H/A:H (token theft, result tampering, lateral network access) is realistically achieved on the maintainer-runs-locally path, or where the repo has weakened the fork-approval gate - not against a hardened default CI. Bottom line: a genuinely serious repo-integrity/RCE issue for this project's CI, but its blast radius is one upstream repo's build pipeline, and default GitHub protections meaningfully gate it - treat as high priority for the project maintainers, low urgency for NetBox operators. |
| Exploit ScenarioDerived | An attacker with no special privileges opens a pull request to netbox-community/devicetype-library that adds tests/git.py (shadowing GitPython, which tests/definitions_test.py imports via 'from git import Git, Repo') or a tests/conftest.py that runs automatically during pytest collection. When CI runs the test harness, Python imports the attacker's module before any test executes, achieving arbitrary code execution on the GitHub Actions runner to steal workflow tokens, tamper with test results, or reach network resources. No public exploit is identified, and exploitation requires a maintainer to approve/run the fork PR (UI:R), which is the main limiting factor. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
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.
RemediationAI
Primary fix: apply upstream commit b0d9a3dadd0a0a9d3c93b0b2777559fd4bad1037 (pull request https://github.com/netbox-community/devicetype-library/pull/4239, advisory https://github.com/netbox-community/devicetype-library/security/advisories/GHSA-wwg5-825x-83g6). Per input data this is an upstream fix available as a commit/PR rather than a tagged release, so a released patched version is not independently confirmed; forks and downstream copies should rebase onto that commit or replicate all five controls together, because partial application leaves gaps. The controls are: (1) add tests/__init__.py that removes the repository root and ''/'.' entries from sys.path before submodules import, (2) add pytest.ini with addopts = --import-mode=importlib --noconftest and testpaths = tests, (3) pin every CI and pre-commit pytest invocation to tests/definitions_test.py instead of bare pytest, (4) use path-safe script invocation (python -m tests.generate_slug_list, python3 -P scripts/update-schema.py), and (5) add .github/CODEOWNERS for /tests/, /.github/, /pytest.ini and /.pre-commit-config.yaml so harness changes require maintainer review. Compensating controls where patching is deferred: keep GitHub's 'require approval for workflows from fork PRs / first-time contributors' setting enabled (repo Settings > Actions > General > Fork pull request workflows) - this is the decisive UI:R gate, and disabling it for convenience directly removes the protection; ensure fork-PR workflows use the default read-only GITHUB_TOKEN and expose no repository secrets (trade-off: such jobs cannot push artifacts or comment on PRs); do not run the raw pytest harness against untrusted PR branches on a developer workstation with repository credentials, and if you must, run it in a disposable container with no secrets or network egress; treat any PR touching tests/*.py, **/conftest.py or pytest.ini as security-sensitive and require maintainer review. Note the trade-offs of the hardening itself: --noconftest disables conftest loading entirely and must be removed (and replaced with a pinned path) if a legitimate conftest.py is ever introduced, and pinning collection to tests/definitions_test.py means any new test module requires a corresponding CI invocation update.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-427 (Uncontrolled Search Path Element) in the pytest test harness. When a test file such as tests/definitions_test.py is collected and the tests directory is not a package (no tests/__init__.py), pytest's default 'prepend' import mode inserts the directory containing the test module - here tests/, plus the repository root - at the front of sys.path. Because definitions_test.py performs bare third-party imports like 'from git import Git, Repo' (GitPython), any module a pull request drops into tests/ with a matching name (e.g. tests/git.py) is imported instead of the genuine installed package, and Python executes its top-level code before any test function runs. A PR-added tests/conftest.py is likewise imported automatically at collection time, giving the same pre-test execution primitive. The resulting code runs with the privileges of the GitHub Actions runner job, enabling runer-side code execution, tampering with test results, and access to any tokens, credentials, or network resources exposed to the workflow. The upstream fix (commit b0d9a3dadd0a0a9d3c93b0b2777559fd4bad1037, PR #4239) hardens the harness by adding tests/__init__.py, which strips the repository root and cwd from sys.path before submodules import; adding pytest.ini with 'addopts = --import-mode=importlib --noconftest' and 'testpaths = tests'; pinning CI and pre-commit test invocations to 'tests/definitions_test.py' so bare pytest cannot collect arbitrary PR-added test_*.py; switching scripts to module/path-safe invocation (python -m tests.generate_slug_list, python3 -P scripts/update-schema.py); and adding .github/CODEOWNERS covering /tests/, /.github/, /pytest.ini and /.pre-commit-config.yaml so harness changes require maintainer review. Note that the description explicitly states this module-shadowing path is independent of the earlier pickle deserialization flaw and the separately tracked NETBOX_DT_LIBRARY_URL issue, so it should be triaged as a distinct weakness in test collection rather than a recurrence of those. The CPE cpe:2.3:a:netbox-community:devicetype-library:* confirms the affected component is the community device-type definitions repository itself, not the NetBox application server; ENISA tracks the same issue as EUVD-2026-82414.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
PR submitted over network (AV:N) with trivial shadow module (AC:L) by any unauthenticated contributor (PR:N); maintainer approval/merge supplies interaction (UI:R); code exec on runner yields full C/I/A on that system (S:U).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
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.
Technical POC Analysis
CWE-427 (Uncontrolled Search Path Element), with CWE-829 as the secondary class.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
The automated build pipeline for the NetBox devicetype-library - the repository that supplies device type definitions to NetBox installations used across the organization - can be induced to run attacker-controlled Python code on GitHub Actions runners when a maintainer approves or manually triggers a contributed pull request. This is unauthenticated code execution gated only by a maintainer action, and because no vendor patch exists, the exposure remains open until repository and workflow configuration is changed. Leadership should care because the same CI infrastructure that builds trusted device-type data could be used as a foothold into automation environments, though default read-only tokens and absent repository secrets limit the immediate blast radius.
No vendor-released patch identified at time of analysis. Interim mitigations: require manual maintainer approval before any fork-PR workflow executes; keep GITHUB_TOKEN read-only and exclude repository secrets from PR-triggered jobs; add tests/__init__.py and run pytest with --import-mode=importlib to prevent PR-supplied modules from shadowing installed packages; pin CI dependencies; restrict who can modify .github/workflows files; and audit CI run logs for unexpected file additions.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-82414
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB