{"answers":{"affected":"2 open source packages ship an affected version, including inventree.","exploited":"There is no known exploitation of GHSA-rm89-9g65-4ffr in the wild and no public exploit code.","fix":"Upgrade inventree to 0.7.2 or later.","what":"GHSA-rm89-9g65-4ffr is a cross-site scripting vulnerability in inventree, published on 17 Jun 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-rm89-9g65-4ffr and fix it if it is affected.\n\nWhat it is: GHSA-rm89-9g65-4ffr is a cross-site scripting vulnerability in inventree, published on 17 Jun 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-rm89-9g65-4ffr in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- inventree (PyPI): affected all versions; fixed in 0.7.2\n- inventree (PyPI): affected all versions; fixed in 0.7.2\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-rm89-9g65-4ffr/ (Markdown: https://insights.sbomify.com/GHSA-rm89-9g65-4ffr/index.md)","id":"GHSA-rm89-9g65-4ffr","markdown":"https://insights.sbomify.com/GHSA-rm89-9g65-4ffr/index.md","name":"GHSA-rm89-9g65-4ffr","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 management","requires_auth":"low_privilege","summary":"Authenticated users can inject malicious JavaScript into the InvenTree web interface due to insufficient HTML sanitization, potentially compromising other users.","user_interaction":"not_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\nAffected versions can have malicious javascript code injected into the users browser by other authenticated users, as data fields retrieved from the database are not properly sanitized before displaying in various front-end views.\n\nThe problem here stems from multiple issues:\n\n- Insufficient database sanitation on multiple fields allows injection of un-sanitized HTML\n- Lack of HTML escaping when rendering data on the front end\n\nThe attack vector here is limited, as only authenticated users are able to write data to the database, for it to be subsequently rendered on the front-end. However, it is a vulnerability that the InvenTree development team takes seriously.\n\n### Solution\n\nThe proposed patch for this vulnerability is prevents injection of un-escaped fields into front-end UI elements.\n\nA future patch will also address sanitization of database fields on the \"back end\", however this will require a much larger effort to refactor multiple database tables.\n\n### Patches\n\n- The issue is addressed in the upcoming `0.8.0` release\n- This fix will also be back-ported to the `0.7.x` branch, applied to the `0.7.2` release\n\n### Workarounds\n\nThere are no workarounds for this issue, users should upgrade to a patched version.\n\n### References\n\n- https://huntr.dev/bounties/4cae8442-c042-43c2-ad89-6f666eaf3d57/\n- https://huntr.dev/bounties/9d640ef2-c52c-4106-b043-f7497d577078/\n- https://huntr.dev/bounties/b114e82f-6c02-485b-82ea-e242f89169c2/\n- https://huntr.dev/bounties/22783cd3-1b2c-48fc-b31f-03b53c86da0b/\n\nThank you @saharshtapi for bringing this issue to our attention and giving pointers for fixing them.\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":"Insufficient HTML Sanitization","id":"GHSA-rm89-9g65-4ffr","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.2"],"introduced":["0"],"last_affected":[],"package":"inventree","purl":null,"source":"GHSA-rm89-9g65-4ffr"},{"ecosystem":"PyPI","fixed":["0.7.2"],"introduced":["0"],"last_affected":[],"package":"inventree","purl":"pkg:pypi/inventree","source":"GHSA-rm89-9g65-4ffr"}],"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":"Authenticated users can inject malicious JavaScript into the InvenTree web interface due to insufficient HTML sanitization, potentially compromising other users.","url":"https://insights.sbomify.com/GHSA-rm89-9g65-4ffr/"}