CVE-2026-27629
MEDIUMDescription
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.
How to fix
Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.
CVSS v3 Vector
Exploitability
Impact
CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
Exploit Intelligence
Low risk: more likely to be exploited than 17% of all known CVEs.
References
Related Vulnerabilities
Other CWE-1336 vulnerabilities, ordered by exploit likelihood. View all
| CVE | Severity | CVSS | EPSS | Exploited | Fix |
|---|---|---|---|---|---|
| CVE-2024-4040 | Critical | 9.8 | 100% | KEV | Fix |
| CVE-2024-23692 | Critical | 9.8 | 99% | KEV | - |
| CVE-2024-32651 | Critical | 10.0 | 84% | - | - |
| CVE-2025-47916 | Critical | 10.0 | 79% | - | Fix |
| CVE-2022-25813 | High | 7.5 | 67% | - | Fix |
| CVE-2025-34300 | Unscored | - | 49% | - | - |
Embed a live status badge for CVE-2026-27629
Markdown
[](https://tridentstack.com/cve/CVE-2026-27629)HTML
<a href="https://tridentstack.com/cve/CVE-2026-27629"><img src="https://tridentstack.com/cve/badge/CVE-2026-27629.svg" alt="CVE-2026-27629"></a>Find and fix vulnerabilities across your fleet
TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.
Start freeThis product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2026-02-27.