Impact
NetBox versions 4.3.5 through 4.5.4 contain a flaw in the RenderTemplateMixin.get_environment_params() method that allows an authenticated user with exporttemplate or configtemplate permissions to inject arbitrary Python callables into the environment_params field. By setting the finalize parameter to a callable such as subprocess.getoutput, the attacker can bypass the Jinja2 SandboxedEnvironment and execute code outside the sandbox, resulting in remote code execution under the NetBox service user. This capability compromises confidentiality, integrity, and availability of the entire NetBox instance.
Affected Systems
The vulnerability affects the NetBox application published by netbox-community, specifically all releases from 4.3.5 to 4.5.4. It requires the target to have users who possess exporttemplate or configtemplate permissions; therefore, any organization running an affected NetBox version with such privileged users is at risk.
Risk and Exploitability
The CVSS score of 8.7 indicates a high severity level, and although the EPSS score is currently unavailable, the lack of a KEV listing does not diminish the potential impact. Savvy attackers with legitimate access to a NetBox instance can leverage this flaw to run arbitrary code, with the exploit likely carried out by a credentialed user performing an export template action. Because the vulnerability is triggered by a specific permission set, the attack surface is limited to authenticated users, but the damage potential remains significant. No publicly documented exploit code is yet released, but the detailed advisory suggests the feasibility of exploitation.
OpenCVE Enrichment