{"id":"CVE-2022-2111","aliases":["CVE-2022-2111","GHSA-fr2w-mp56-g4xp","PYSEC-2026-825"],"related":[],"kind":"vulnerability","state":"published","title":"Unrestricted Upload of File with Dangerous Type in inventree/inventree","summary":"Unrestricted Upload of File with Dangerous Type in GitHub repository inventree/inventree prior to 0.7.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Unrestricted Upload of File with Dangerous Type in GitHub repository inventree/inventree prior to 0.7.2.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nInvenTree 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.\n\n![image](https://user-images.githubusercontent.com/10080325/173549827-af2d7a5c-1359-4d68-a920-dfdd0ccc882e.png)\n\n*Note that the upload of malicious files must be performed by an authenticated user account*\n\n### Solution\n\nThe 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.\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\nUsers can alleviate risk of opening malicious files by right-clicking on the attachment link and selecting \"Save link as\"\n\n![image](https://user-images.githubusercontent.com/10080325/173550035-2de4bf01-f0d3-4be8-ac45-6fbcf66a95e7.png)\n\nThis minimizes risk (e.g. of XSS attacks) by opening the HTML file from the users computer\n\n### References\n\nhttps://huntr.dev/bounties/a0e5c68e-0f75-499b-bd7b-d935fb8c0cd1/\n\n### For more information\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)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Una Carga no Restringida de un Archivo con un Tipo Peligroso en el repositorio de GitHub inventree/inventree versiones hasta 0.7.2","source":"nvd"}],"published":"2022-06-17T01:16:55.000Z","modified":"2026-07-07T11:56:17.424Z","severity":{"scorer":"@huntrdev","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","score":9,"rating":"CRITICAL"},"severities":[{"scorer":"@huntrdev","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","score":9,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","score":6.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-434"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"0.7.2","status":"affected"}],"vendor":"inventree","product":"inventree/inventree","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.7.2"}],"ecosystem":"PyPI","package":"inventree","purl":"pkg:pypi/inventree","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.7.2"}],"vendor":"inventree_project","product":"inventree","cpe":"cpe:2.3:a:inventree_project:inventree:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.7.2"}],"ecosystem":"PyPI","package":"inventree","purl":"pkg:pypi/inventree","source":"pysec"}],"references":[{"url":"https://huntr.dev/bounties/a0e5c68e-0f75-499b-bd7b-d935fb8c0cd1","tags":["exploit","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/inventree/inventree/commit/26bf51c20a1c9b3130ac5dd2e17649bece5ff84f","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/inventree/InvenTree/security/advisories/GHSA-fr2w-mp56-g4xp","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-2111","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/inventree/inventree-python","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/inventree","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-fr2w-mp56-g4xp","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"@huntrdev","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-2111","url":"https://www.cve.org/CVERecord?id=CVE-2022-2111","licence":"CVE Terms of Use","modified":"2024-08-03T00:24:44.204Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fr2w-mp56-g4xp","url":"https://github.com/advisories/GHSA-fr2w-mp56-g4xp","licence":"CC-BY-4.0","modified":"2026-07-07T11:56:17.424Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-2111","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-2111","licence":"Public domain","modified":"2026-06-17T04:41:19.473Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-825","url":"https://osv.dev/vulnerability/PYSEC-2026-825","licence":"CC-BY-4.0","modified":"2026-07-07T11:46:04.485Z"}],"updatedAt":"2026-11-25T22:58:12.439Z","epss":{"score":0.01258,"percentile":0.70414,"date":"2026-12-01T12:00:22.000Z"}}