{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:inventree_project:inventree:*:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "1.2.3"
              },
              {
                "fixed": "1.2.7"
              },
              {
                "last_affected": "1.2.6"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "CPE_RANGE"
            ]
          },
          "events": [
            {
              "introduced": "12da3b01fc1f32553009fe9041f3bbfca9d55f32"
            },
            {
              "fixed": "01bf60000462fd19d8f939a0561e55e08f38a260"
            }
          ],
          "repo": "https://github.com/inventree/inventree",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-84jh-x777-8pqq"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-1336"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/35xxx/CVE-2026-35477.json"
  },
  "details": "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.",
  "id": "CVE-2026-35477",
  "modified": "2026-07-15T01:49:18.059734718Z",
  "published": "2026-04-08T19:20:58.967Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/35xxx/CVE-2026-35477.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/inventree/InvenTree/security/advisories/GHSA-84jh-x777-8pqq"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-35477"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "InvenTree has SSTI in PART_NAME_FORMAT bypasses CVE-2026-27629 fix via {% if part.pk %} sandbox escape"
}