# CVE-2026-35477: InvenTree has SSTI in PART_NAME_FORMAT bypasses CVE-2026-27629 fix via {% if part.pk %} sandbox escape

- Severity: Medium 5.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 21% of CVEs (2026-12-02)
- Published: 2026-04-08T19:20:58.967Z
- Modified: 2026-10-06T22:10:00.247Z
- Weaknesses: CWE-1336
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- inventree InvenTree: >= 1.2.3, < 1.2.7
- inventree_project inventree: from 1.2.3 up to 1.2.6

## Every score

- GitHub_M: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://github.com/inventree/InvenTree/security/advisories/GHSA-84jh-x777-8pqq> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-35477](https://www.cve.org/CVERecord?id=CVE-2026-35477), CVE Terms of Use, modified 2026-04-10
- NVD: [CVE-2026-35477](https://nvd.nist.gov/vuln/detail/CVE-2026-35477), Public domain, modified 2026-10-06

---

Page: https://cve.day/CVE-2026-35477 · Whole record: https://cve.day/CVE-2026-35477.json · Rebuilt by cve.day 2026-11-25T22:59:18.304Z
