{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-27629 in the wild and no public exploit code.","fix":"No fix has been published for CVE-2026-27629 yet. Limit exposure of the affected software until one is available.","what":"CVE-2026-27629 is a medium-severity code injection vulnerability in InvenTree, published on 25 Feb 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-27629 and fix it if it is affected.\n\nWhat it is: CVE-2026-27629 is a medium-severity code injection vulnerability in InvenTree, published on 25 Feb 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-27629 in the wild and no public exploit code.\n\nAffected product: InvenTree. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-27629/ (Markdown: https://insights.sbomify.com/CVE-2026-27629/index.md)","id":"CVE-2026-27629","markdown":"https://insights.sbomify.com/CVE-2026-27629/index.md","name":"CVE-2026-27629","record":{"aliases":["GHSA-cx85-vr3q-9x4m"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Inventory Management System","requires_auth":"low_privilege","summary":"Staff users can inject malicious Jinja2 templates into batch code generation, leading to server-side code execution and sensitive data exposure.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"inventree","vendor":"inventree_project"}],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"description":"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.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":false,"headline":"InvenTree Vulnerable to Server Side Template Injection (SSTI)","id":"CVE-2026-27629","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":0,"n_references":1,"next":{"headline":"TinyWeb vulnerable to Remote Denial of Service via Thread/Connection Exhaustion (Slowloris)","id":"CVE-2026-27630"},"packages":[],"prev":{"headline":"pypdf has a possible infinite loop when loading circular /Prev entries in cross-reference streams","id":"CVE-2026-27628"},"products":["InvenTree"],"published":"2026-02-25","related":[{"cvss_score":9,"headline":"Unrestricted Upload of File with Dangerous Type in inventree/inventree","id":"CVE-2022-2111","kev_date_added":null,"published":"2022-06-17"},{"cvss_score":9,"headline":"Improper Neutralization of Formula Elements in a CSV File in inventree/inventree","id":"CVE-2022-2112","kev_date_added":null,"published":"2022-06-17"},{"cvss_score":8.4,"headline":"Cross-site Scripting (XSS) - Stored in inventree/inventree","id":"CVE-2022-2113","kev_date_added":null,"published":"2022-06-17"},{"cvss_score":8.3,"headline":"InvenTree has Arbitrary API Token Creation","id":"CVE-2026-35478","kev_date_added":null,"published":"2026-04-08"},{"cvss_score":8.2,"headline":"Cross-site Scripting (XSS) - Stored in inventree/inventree","id":"CVE-2022-3355","kev_date_added":null,"published":"2022-09-29"},{"cvss_score":7.7,"headline":"InvenTree Vulnerable to ORM Filter Injection","id":"CVE-2026-33530","kev_date_added":null,"published":"2026-03-26"},{"cvss_score":7.3,"headline":"Stored Cross-site Scripting Vulnerability in Markdown Editor","id":"CVE-2024-47610","kev_date_added":null,"published":"2024-10-07"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-02-26","vendors":["inventree"]},"summary":"Staff users can inject malicious Jinja2 templates into batch code generation, leading to server-side code execution and sensitive data exposure.","url":"https://insights.sbomify.com/CVE-2026-27629/"}