{"answers":{"affected":"2 open source packages ship an affected version, including inventree.","exploited":"There is no known exploitation of GHSA-85q9-7467-r53q in the wild and no public exploit code.","fix":"Upgrade inventree to 0.7.3 or later.","what":"GHSA-85q9-7467-r53q is a cross-site scripting vulnerability in inventree, published on 17 Jun 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-85q9-7467-r53q and fix it if it is affected.\n\nWhat it is: GHSA-85q9-7467-r53q is a cross-site scripting vulnerability in inventree, published on 17 Jun 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-85q9-7467-r53q in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- inventree (PyPI): affected all versions; fixed in 0.7.3\n- inventree (PyPI): affected all versions; fixed in 0.7.3\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/GHSA-85q9-7467-r53q/ (Markdown: https://insights.sbomify.com/GHSA-85q9-7467-r53q/index.md)","id":"GHSA-85q9-7467-r53q","markdown":"https://insights.sbomify.com/GHSA-85q9-7467-r53q/index.md","name":"GHSA-85q9-7467-r53q","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"InvenTree inventory system","requires_auth":"low_privilege","summary":"An attacker with low privileges can inject malicious scripts into markdown fields, leading to code execution in other users' browsers.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\n\nInvenTree uses [EasyMDE](https://github.com/Ionaru/easy-markdown-editor) for displaying markdown text in various places (e.g. for the various \"notes\" fields associated with various models).\n\nBy default, EasyMDE does not sanitize input data, and it is possible for malicious code to be injected into the markdown editor, and executed in the users browser.\n\n*Note: This malicious data must be first uploaded to the database by an authorized user, so the risk here is limited to trusted users*\n\n### Solution\n\nThe solution here is two-fold:\n\n- Enable data sanitization for the EasyMDE renderer - [#3205](https://github.com/inventree/InvenTree/pull/3205)\n- Enforce cleaning of all data uploaded to the database via the API - [#3204](https://github.com/inventree/InvenTree/pull/3204) *(This will be ready for the 0.8.0 release)*\n\n### Patches\n\n- The issue is addressed in the 0.8.0 release\n- This fix was back-ported to the 0.7.x branch, applied to the 0.7.3 release\n\n### Workarounds\n\nThere is no workaround for this issue without upgrading InvenTree to the specified version.\n\n### References\n\n- https://huntr.dev/bounties/ab296cf5-7a3e-4f49-8f63-5b35fc707f03/\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [github](http://github.com/inventree/inventree)\n* Email us at [security@inventree.org](mailto:security@inventree.org)","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"XSS Vulnerability in Markdown Editor","id":"GHSA-85q9-7467-r53q","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xss","year":"2022"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["0.7.3"],"introduced":["0"],"last_affected":[],"package":"inventree","purl":null,"source":"GHSA-85q9-7467-r53q"},{"ecosystem":"PyPI","fixed":["0.7.3"],"introduced":["0"],"last_affected":[],"package":"inventree","purl":"pkg:pypi/inventree","source":"GHSA-85q9-7467-r53q"}],"products":null,"published":"2022-06-17","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An attacker with low privileges can inject malicious scripts into markdown fields, leading to code execution in other users' browsers.","url":"https://insights.sbomify.com/GHSA-85q9-7467-r53q/"}