GHSA-85q9-7467-r53q: Inventree Cross-Site Scripting Vulnerability

HIGH
CWE-79
Published
Advisory Summary

GHSA-85q9-7467-r53q is a HIGH cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Inventree libraries in the PyPI ecosystem. The issue involves xss vulnerability in markdown editor. Remediation is available by upgrading affected packages to version 0.7.3.

GHSA-85q9-7467-r53q at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-85q9-7467-r53q
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Inventree
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix GHSA-85q9-7467-r53q

To remediate this vulnerability, upgrade all affected Inventree dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

inventree fixed: 0.7.3
pip install inventree>=0.7.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show inventree

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-85q9-7467-r53q, inspect your installed packages using pip:

pip show inventree

Analyze the terminal output to locate any version of Inventree in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.3), your application is affected.

Note: The pip show inventree command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Inventree, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact InvenTree 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). By 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. *Note: This malicious data must be first uploaded to the database by an authorized user, so the risk here is limited to trusted users* ### Solution The solution here is two-fold: - Enable data sanitization for the EasyMDE renderer - [#3205](https://github.com/inventree/InvenTree/pull/3205) - 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)* ### Patches - The issue is addressed in the 0.8.0 release - This fix was back-ported to the 0.7.x branch, applied to the 0.7.3 release ### Workarounds There is no workaround for this issue without upgrading InvenTree to the specified version. ### References - https://huntr.dev/bounties/ab296cf5-7a3e-4f49-8f63-5b35fc707f03/ ### For more information If you have any questions or comments about this advisory: * Open an issue in [github](http://github.com/inventree/inventree) * Email us at [security@inventree.org](mailto:security@inventree.org)

GHSA-85q9-7467-r53q Affected Inventree Versions

1 component(s)
Fixed Versions:
0.7.3
Product / Package Ecosystem Affected Versions Fixed Version
inventree
PyPI
< 0.7.3
0.7.3

References

Frequently Asked Questions

What is GHSA-85q9-7467-r53q?
GHSA-85q9-7467-r53q is a security vulnerability in Inventree involving XSS Vulnerability in Markdown Editor under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Inventree versions are affected?
Affected versions include releases prior to 0.7.3 across affected packages: inventree.
What version fixes GHSA-85q9-7467-r53q?
Upgrading to 0.7.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is inventree affected?
Yes, inventree is affected in releases prior to 0.7.3. Upgrade your dependency to 0.7.3 or later.
What CWE is associated with GHSA-85q9-7467-r53q?
GHSA-85q9-7467-r53q is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check PyPI dependencies for GHSA-85q9-7467-r53q?
Run the dependency tree command: 'pip show inventree'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-85q9-7467-r53q",
  "modified" : "2026-04-24T19:49:10Z",
  "published" : "2022-06-17T21:51:45Z",
  "aliases" : [ ],
  "summary" : "XSS Vulnerability in Markdown Editor",
  "details" : "### 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)",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "inventree"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.7.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/inventree/InvenTree/security/advisories/GHSA-85q9-7467-r53q"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-17T21:51:45Z",
    "nvd_published_at" : null
  }
}