LiveActive security incident?Get immediate response
CVE Record

CVE-2026-27629: InvenTree Vulnerable to Server Side Template Injection (SSTI)

InvenTree is an Open Source Inventory Management System. Prior to version 1.2.3, insecure server-side templates can be hijacked to expose secure information to the client. When generating custom batch codes, the InvenTree server makes use of a customizable jinja2 template, which can be modified by a staff user to exfiltrate sensitive information or perform code execution on the server. This issue requires access by a user with granted staff permissions, followed by a request to generate a custom batch code via the API. Once the template has been modified in a malicious manner, the API call to generate a new batch code could be made by other users, and the template code will be executed with their user context. The code has been patched to ensure that all template generation is performed within a secure sandboxed context. This issue has been addressed in version 1.2.3, and any versions from 1.3.0 onwards. Some workarounds are available. The batch code template is a configurable global setting which can be adjusted via any user with staff access. To prevent this setting from being edited, it can be overridden at a system level to a default value, preventing it from being edited. This requires system administrator access, and cannot be changed from the client side once the server is running. It is recommended that for InvenTree installations prior to 1.2.3 the `STOCK_BATCH_CODE_TEMPLATE` and `PART_NAME_FORMAT` global settings are overridden at the system level to prevent editing.

MediumCVSS 5.9Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

InvenTree before 1.2.3 lets a staff user alter server-side template settings used for batch code generation. A malicious template could expose sensitive data or execute code on the server. This is not a simple internet drive-by issue, but it matters where staff accounts are numerous, weakly controlled, or compromised.

Executive priority

Prioritize remediation for production InvenTree systems and environments with broad staff access. The issue is moderate in rating but has meaningful impact because the advisory mentions sensitive data exposure and possible server-side code execution after staff-level misuse or account compromise.

Technical view

CVE-2026-27629 is a server-side template injection issue in InvenTree’s customizable Jinja2 templates. The advisory cites custom batch code generation and recommends securing STOCK_BATCH_CODE_TEMPLATE and PART_NAME_FORMAT. Exploitation requires staff permission to modify global settings and a later API request to generate a custom batch code. Fixed by sandboxed template generation in 1.2.3 and later 1.3.x releases.

Likely exposure

Organizations running InvenTree versions before 1.2.3 are exposed, especially if staff users can edit global settings. Instances on 1.2.3 or any 1.3.0+ version are described as addressed by the source advisory.

Exploitation context

No active exploitation is indicated in the provided sources, and the CVE is not listed as KEV. The attack requires authenticated staff-level access to modify a template, then batch-code generation through the API. Other users may trigger the malicious template after it is changed.

Researcher notes

Evidence is limited to the CVE record and GitHub advisory. The advisory states sandboxing was added and names two settings for workaround. Avoid assuming unauthenticated exposure. Focus assessment on version, staff permission boundaries, global setting editability, and whether vulnerable templates could be triggered through normal API use.

Mitigation direction

  • Upgrade InvenTree to version 1.2.3 or any 1.3.0+ release.
  • If not upgrading immediately, override STOCK_BATCH_CODE_TEMPLATE at the system level.
  • Also override PART_NAME_FORMAT at the system level for pre-1.2.3 installations.
  • Restrict staff permissions to trusted users only.
  • Review vendor advisory for current workaround and upgrade guidance.

Validation and detection

  • Inventory all InvenTree deployments and record running versions.
  • Confirm whether any deployment is below version 1.2.3.
  • Check whether staff users can edit global template settings.
  • Verify STOCK_BATCH_CODE_TEMPLATE and PART_NAME_FORMAT are system-level overridden where required.
  • Review recent changes to global settings by staff users.
Prepared
Confidence
high
Sources
3

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-1336: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-27629 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
5.9 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
2Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
5.9CVSS 3.1MediumCVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L1.73.7Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

5.9Medium
CVSS 3.1 vector shape for CVE-2026-27629Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
inventreeInvenTree< 1.2.3Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-1336 · source CWE mapping

Improper Neutralization of Special Elements Used in a Template Engine

Improper Neutralization of Special Elements Used in a Template Engine represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.