Junglewise Threat Intelligence

CVE-2026-35477: InvenTree SSTI in PART_NAME_FORMAT naming template

CVE-2026-35477 · Severity: medium · CVSS 5.5 · Published 2026-04-08

Technologies: InvenTree. Vendors: InvenTree.

Executive brief

InvenTree, an open-source inventory management system, contains a security flaw in how it handles custom naming formats for parts. A staff member with access to system settings could provide a specially crafted template that bypasses security checks to execute unauthorized commands on the server. This could allow an internal user to access sensitive data or modify system files beyond their intended permissions.

Technical details

A Server-Side Template Injection (SSTI) vulnerability exists in InvenTree versions 1.2.3 through 1.2.6. While the PART_NAME_FORMAT validator was previously updated to use Jinja2's SandboxedEnvironment, the actual rendering logic in part/helpers.py continued to use the standard, non-sandboxed jinja2.Environment. Furthermore, the validator uses a dummy Part instance with a null primary key, allowing attackers to use conditional logic to bypass validation while executing malicious code during production rendering. An attacker with staff-level privileges and settings access can exploit this to achieve remote code execution. The issue is resolved in versions 1.2.7 and 1.3.0 by ensuring the renderer uses the SandboxedEnvironment and hardening the validator.

Affected products

  • InvenTree InvenTree 1.2.3 to 1.2.6

Timeline

  • 2026-04-07: advisory: GitHub Security Advisory published
  • 2026-04-08: disclosed: NVD publication date

References