{"id":"CVE-2026-35477","aliases":["CVE-2026-35477"],"related":[],"kind":"vulnerability","state":"published","title":"InvenTree has SSTI in PART_NAME_FORMAT bypasses CVE-2026-27629 fix via {% if part.pk %} sandbox escape","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"InvenTree es un Sistema de Gestión de Inventario de Código Abierto. Desde 1.2.3 hasta 1.2.6, la corrección para CVE-2026-27629 actualizó el validador PART_NAME_FORMAT para usar jinja2.sandbox.SandboxedEnvironment. Sin embargo, el renderizador real en part/helpers.py no fue actualizado y aún usa el jinja2.Environment no-sandboxed. Además, el validador usa una instancia 'dummy' de Part con pk=None, lo que permite que las expresiones de plantilla condicionales se comporten de manera diferente durante la validación en comparación con la renderización en producción. Un usuario del personal con acceso a la configuración puede crear una plantilla que pasa la validación pero ejecuta código arbitrario durante la renderización. Este problema requiere acceso por parte de un usuario con permisos de personal concedidos. Esta vulnerabilidad se corrige en 1.2.7 y 1.3.0.","source":"nvd"}],"published":"2026-04-08T19:20:58.967Z","modified":"2026-10-06T22:10:00.247Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"}],"cwes":["CWE-1336"],"affected":[{"ranges":[{"version":">= 1.2.3, < 1.2.7","status":"affected"}],"vendor":"inventree","product":"InvenTree","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"1.2.3","lastAffected":"1.2.6"}],"vendor":"inventree_project","product":"inventree","cpe":"cpe:2.3:a:inventree_project:inventree:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/inventree/InvenTree/security/advisories/GHSA-84jh-x777-8pqq","tags":["third-party-advisory","x-refsource-confirm"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-04-10T20:43:01.777Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-35477","url":"https://www.cve.org/CVERecord?id=CVE-2026-35477","licence":"CVE Terms of Use","modified":"2026-04-10T20:43:12.243Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-35477","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35477","licence":"Public domain","modified":"2026-10-06T22:10:00.247Z"}],"updatedAt":"2026-11-25T22:59:18.304Z","epss":{"score":0.00275,"percentile":0.21344,"date":"2026-12-02T12:00:21.000Z"}}