CVE-2026-35477 Details
Description
InvenTree is an Open Source Inventory Management System. From 1.2.3 to 1.2.6, the fix for CVE-2026-27629 upgraded the PART_NAME_FORMAT validator to use jinja2.sandbox.SandboxedEnvironment. However, the actual renderer in part/helpers.py was not updated and still uses the non-sandboxed jinja2.Environment. Additionally, the validator uses a dummy Part instance with pk=None, which allows conditional template expressions to behave differently during validation versus production rendering. A staff user with settings access can craft a template that passes validation but executes arbitrary code during rendering. This issue requires access by a user with granted staff permissions. This vulnerability is fixed in 1.2.7 and 1.3.0.
A vulnerability allowing arbitrary code execution has been identified in InvenTree versions 1.2.3 prior to 1.2.6. The issue arises because the PART_NAME_FORMAT validator was updated to use a sandboxed Jinja2 environment, but the corresponding renderer in part/helpers.py was not. This oversight allows a staff user with settings access to create a template that passes validation but executes arbitrary code when rendered. The vulnerability takes advantage of a dummy Part instance used during validation, which can alter the behavior of conditional template expressions.
Users can update to InvenTree versions 1.2.7 or 1.3.0, where this vulnerability has been patched. Alternatively, the PART_NAME_FORMAT setting can be overridden at the system level to a default value, preventing it from being edited via the client interface. This requires system administrator access.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 10, 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/inventree/InvenTree/security/advisories/GHSA-84jh-x777-8pqq | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1336 | Improper Neutralization of Special Elements Used in a Template Engine | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| inventree project inventree | >= 1.2.3, <= 1.2.6 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 20, 2026 | Initial Analysis | [email protected] |
| Apr 8, 2026 | New CVE Received | [email protected] |