CVE-2026-27629
InvenTree Vulnerable to Server Side Template Injection (SSTI)
Mitigation
- Upgrade InvenTree to 1.2.3 or later.
Who should check
- Anyone running InvenTree < 1.2.3
Vulnerability facts
- Affected
- InvenTree < 1.2.3
- Fixed in
- InvenTree 1.2.3
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.9 (v3.1, CNA)CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Adjacent network
- Attack complexity: Low
- Privileges required: Low
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: Low
- EPSS
- 0.56% chance of exploitation in 30 days (percentile 40, 2026-11-26)
- CWE
- CWE-1336
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| InvenTree | < 1.2.3 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-27629. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-27629.md Affected: InvenTree < 1.2.3 Fixed in: InvenTree 1.2.3 Steps: 1. Search this machine and project for InvenTree: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2026-27629 being exploited?
There is no confirmed exploitation: CVE-2026-27629 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.56% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-27629?
Medium: CVSS 5.9 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2026-27629?
InvenTree < 1.2.3.
Is there a fix for CVE-2026-27629?
Yes. Fixed in InvenTree 1.2.3. Upgrade InvenTree to 1.2.3 or later.
How do I check if I'm affected by CVE-2026-27629?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.