CVE-2022-2111

CVE-2022-2111 is a high-severity unrestricted upload of dangerous file types vulnerability in inventree (pip), affecting versions < 0.7.2. It is fixed in 0.7.2.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Unrestricted Attachment Upload

Patches

  • The issue is addressed in the upcoming 0.8.0 release
  • This fix will also be back-ported to the 0.7.x branch, applied to the 0.7.2 release

Workarounds

Users can alleviate risk of opening malicious files by right-clicking on the attachment link and selecting "Save link as"

This minimizes risk (e.g. of XSS attacks) by opening the HTML file from the users computer

References

https://huntr.dev/bounties/a0e5c68e-0f75-499b-bd7b-d935fb8c0cd1/

For more information

If you have any questions or comments about this advisory:

Impact

InvenTree allows unrestricted upload of files as attachments to various database fields. Potentially dangerous files (such as HTML files containing malicious javascript) can be uploaded, and (when opened by the user) run the malicious code directly in the users browser.

Note that the upload of malicious files must be performed by an authenticated user account

The application accepts file uploads without adequately restricting the file type or content. Typical impact: remote code execution if the uploaded file can be served and executed on the server.

CVE-2022-2111 has a CVSS score of 8.8 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.7.2); upgrading removes the vulnerable code path.

Affected versions

inventree (< 0.7.2)

Security releases

inventree → 0.7.2 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

The solution for this vulnerability is to ensure that attachment files are downloaded to the local machine before opening, rather than opening the file in the current browser context.

Frequently Asked Questions

  1. What is CVE-2022-2111? CVE-2022-2111 is a high-severity unrestricted upload of dangerous file types vulnerability in inventree (pip), affecting versions < 0.7.2. It is fixed in 0.7.2. The application accepts file uploads without adequately restricting the file type or content.
  2. How severe is CVE-2022-2111? CVE-2022-2111 has a CVSS score of 8.8 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of inventree are affected by CVE-2022-2111? inventree (pip) versions < 0.7.2 is affected.
  4. Is there a fix for CVE-2022-2111? Yes. CVE-2022-2111 is fixed in 0.7.2. Upgrade to this version or later.
  5. Is CVE-2022-2111 exploitable, and should I be worried? Whether CVE-2022-2111 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2022-2111 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2022-2111? Upgrade inventree to 0.7.2 or later.

Other vulnerabilities in inventree

Stop the waste.
Protect your environment with Kodem.