Skip to main content

Inventree CVE-2026-35477

| EUVDEUVD-2026-20588 CRITICAL
Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336)
2026-04-08 security-advisories@github.com
9.9
CVSS 3.1 · NVD
View

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
Impact

CVSS 5.5 with PR:H (high privilege required) significantly constrains real-world risk; this is not a remote unauthenticated attack. However, the vulnerability chain demonstrates a dangerous pattern: incomplete security fixes and inconsistent use of security controls create exploitability gaps. The attacker requires staff-level access and settings modification permissions, which limits the threat model to insider threats or accounts compromised with high privileges. SSVC analysis suggests this is remediation-triggered exposure: the incomplete fix to CVE-2026-27629 re-introduced the vulnerability in a form bypassing the intended sandbox. The tags confirm SSTI and RCE capability, elevating concern despite high privilege requirements. Organizations should prioritize patching based on their internal access controls; if staff accounts are widely distributed or poorly managed, risk escalates. The fact that versions 1.2.3-1.2.6 were shipped with a known-incomplete remediation is a process failure that warrants review of release practices.

Exploit ScenarioDerived

A staff user with access to InvenTree's settings pages (specifically the PART_NAME_FORMAT configuration) crafts a Jinja2 template such as '{{ part.name }}{% if part.pk %}{{ __import__("os").system("id") }}{% endif %}' that includes conditional template injection. During validation, the sandboxed environment rejects the injection, but because the validator uses a dummy Part with pk=None, the conditional evaluates to False and the malicious code is never tested. The template is stored. When actual parts are rendered (pk has a real value), the production renderer uses the unsandboxed environment, the conditional evaluates to True, and arbitrary Python code executes with the privileges of the InvenTree application process. No public exploit code has been identified at the time of analysis; the attack requires intimate knowledge of the inconsistency between validator and renderer.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 08, 2026

Remote code execution in InvenTree 1.2.3 through 1.2.6 allows staff users with settings access to execute arbitrary code by crafting malicious Jinja2 templates that bypass sandbox validation. The vulnerability exists because the PART_NAME_FORMAT validator uses a sandboxed Jinja2 environment, but the actual rendering engine in part/helpers.py uses an unsandboxed environment, combined with a validation bypass via dummy Part instances with pk=None that behave differently during validation versus production execution. No public exploit code or active exploitation confirmed at time of analysis.

RemediationAI

Upgrade InvenTree to version 1.2.7 or 1.3.0 or later. The patch synchronizes the PART_NAME_FORMAT renderer in part/helpers.py to use the same jinja2.sandbox.SandboxedEnvironment as the validator, and corrects the validation bypass by ensuring template rendering behavior is consistent between validation and production. Organizations unable to upgrade immediately should restrict staff-level access and settings modification permissions to only trusted administrators, and audit recent changes to part naming format templates for suspicious template syntax. For detailed remediation guidance, consult the GitHub Security Advisory at https://github.com/inventree/InvenTree/security/advisories/GHSA-84jh-x777-8pqq.

Affected VersionsENISA

InvenTree 1.2.3, < 1.2.7

Affected Packages

euvd inventree_1_2_3 fix: 1.2.7

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

InvenTree uses Jinja2 templating for part naming formats. The vulnerability stems from an incomplete remediation of CVE-2026-27629: while the validator was upgraded to jinja2.sandbox.SandboxedEnvironment to prevent template injection, the production renderer in part/helpers.py retained the unrestricted jinja2.Environment. Additionally, the validator creates a dummy Part object with pk=None to test templates, but this allows conditional expressions (such as {% if part.pk %}) to execute different code paths during validation versus real rendering where pk contains an actual value. Attackers with staff permissions and settings modification rights can craft templates that pass the sandboxed validator but execute arbitrary Python code when the unsandboxed renderer processes them. This is a classic Server-Side Template Injection (SSTI) attack enabled by inconsistent sandboxing.

Know when Inventree 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

NVD PRIMARY 9.9 CRITICAL
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

4
Severity Changed
Jul 24, 2026 - 21:22 NVD
MEDIUM CRITICAL
CVSS changed
Jul 24, 2026 - 21:22 NVD
5.5 (MEDIUM) 9.9 (CRITICAL)
Patch available
Apr 16, 2026 - 05:29 EUVD
1.2.7
CVE Published
Apr 08, 2026 - 20:16 nvd
MEDIUM 5.5

DescriptionNVD

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.

Threat Intelligence Overview

EPSS Score
0.0%
Top 94% exploitable
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2022-2112 HIGH POC
8.8 Jun 17

Improper Neutralization of Formula Elements in a CSV File in GitHub repository inventree/inventree prior to 0.7.2. Rated

CVE-2022-2111 HIGH POC
8.8 Jun 17

Unrestricted Upload of File with Dangerous Type in GitHub repository inventree/inventree prior to 0.7.2. Rated high seve

CVE-2022-2134 MEDIUM POC
6.5 Jun 20

Allocation of Resources Without Limits or Throttling in GitHub repository inventree/inventree prior to 0.8.0. Rated medi

CVE-2022-3355 MEDIUM POC
5.4 Sep 29

Cross-site Scripting (XSS) - Stored in GitHub repository inventree/inventree prior to 0.8.3. Rated medium severity (CVSS

CVE-2022-2113 MEDIUM POC
5.4 Jun 17

Cross-site Scripting (XSS) - Stored in GitHub repository inventree/inventree prior to 0.7.2. Rated medium severity (CVSS

CVE-2026-35478 HIGH
8.1 Apr 08

Authentication bypass in InvenTree open source inventory management system allows any authenticated user to generate API

CVE-2026-61744 MEDIUM
6.5 Sep 21

Broken object-level authorization in InvenTree prior to 1.4.0 allows any authenticated low-privilege user - or any holde

CVE-2026-61749 MEDIUM
6.5 Sep 21

InvenTree versions prior to 1.4.0 render report and label templates with WeasyPrint's default URL fetcher, so an authent

CVE-2026-33530 MEDIUM
6.5 Mar 26

Authenticated attackers with low-level privileges can exfiltrate sensitive database information from InvenTree open sour

CVE-2026-27629 MEDIUM
5.9 Feb 25

InvenTree prior to version 1.2.3 allows authenticated staff users to inject malicious Jinja2 template code into batch co

CVE-2024-47610 MEDIUM
5.4 Oct 07

InvenTree is an Open Source Inventory Management System. Rated medium severity (CVSS 5.4), this vulnerability is remotel

CVE-2026-61746 MEDIUM
5.3 Sep 21

Unauthenticated information disclosure in InvenTree prior to 1.4.0 lets a remote caller retrieve plugin names, setting k

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy