{"id":"CVE-2026-35477","published":"2026-04-08T19:20:58Z","modified":"2026-04-10T20:43:12Z","title":"InvenTree has SSTI in PART_NAME_FORMAT bypasses CVE-2026-27629 fix via {% if part.pk %} sandbox escape","vendor":"inventree","product":"InvenTree","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00269,"percentile":0.19541,"provenance":"source"},"cwes":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"references":[{"url":"https://github.com/inventree/InvenTree/security/advisories/GHSA-84jh-x777-8pqq","tags":["x_refsource_CONFIRM"]}],"priority":{"score":7.8,"factors":[{"name":"EPSS percentile","points":3.91},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"inventree","affectedVersions":[{"vendor":"inventree","product":"InvenTree","versions":[">= 1.2.3, < 1.2.7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-10T20:43:01.777985Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-20588","exploited":false,"provenance":"source"}}