GHSA-vx3h-qwqw-r2wq: Inventree Inventree Server-Side Request Forgery Vulnerability Vulnerability

MODERATE
CVSS 4.3
CWE-918
Published
Advisory Summary

GHSA-vx3h-qwqw-r2wq is a MODERATE (CVSS 4.3) inventree server-side request forgery vulnerability vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Inventree libraries in the PyPI ecosystem. The issue involves inventree server-side request forgery vulnerability exposes server port/internal ip. Remediation is available by upgrading affected packages to version 0.16.5.

GHSA-vx3h-qwqw-r2wq at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-vx3h-qwqw-r2wq
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Inventree
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-vx3h-qwqw-r2wq

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.16.5
pip install inventree>=0.16.5
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-vx3h-qwqw-r2wq, 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.16.5), 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-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. 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 The "download image from remote URL" feature can be abused by a malicious actor to potentially extract information about server side resources. Submitting a crafted URL (in place of a valid image) can raise a server side error, which is reported back to the user. This error message may contain sensitive information about the server side request, including information about the availability of the remote resource. ### Patches The solution to this vulnerability is to prevent the server from returning any specific information about the observed exception. Instead, a generic error message is returned to the client. This patch has been applied to the upcoming 0.17.0 release, and also back-ported to the 0.16.5 stable release. ### Workarounds To avoid this issue with unpatched versions, the "download image from remote URL" feature can be disabled in InvenTree, preventing users from accessing this information. ### References Thanks to @febin0x10 for identifying this vulnerability and reporting it to us as per our security policy.

GHSA-vx3h-qwqw-r2wq Affected Inventree Versions

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

References

Frequently Asked Questions

What is GHSA-vx3h-qwqw-r2wq?
GHSA-vx3h-qwqw-r2wq is a security vulnerability in Inventree involving Inventree Server-Side Request Forgery vulnerability exposes server port/internal IP under CWE-918: Server-Side Request Forgery (SSRF).
Which Inventree versions are affected?
Affected versions include releases prior to 0.16.5 across affected packages: inventree.
What version fixes GHSA-vx3h-qwqw-r2wq?
Upgrading to 0.16.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is inventree affected?
Yes, inventree is affected in releases prior to 0.16.5. Upgrade your dependency to 0.16.5 or later.
What is the CVSS score of GHSA-vx3h-qwqw-r2wq?
GHSA-vx3h-qwqw-r2wq has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with GHSA-vx3h-qwqw-r2wq?
GHSA-vx3h-qwqw-r2wq is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check PyPI dependencies for GHSA-vx3h-qwqw-r2wq?
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-vx3h-qwqw-r2wq",
  "modified" : "2024-10-02T17:58:44Z",
  "published" : "2024-10-02T17:58:44Z",
  "aliases" : [ ],
  "summary" : "Inventree Server-Side Request Forgery vulnerability exposes server port/internal IP",
  "details" : "### Impact\n\nThe \"download image from remote URL\" feature can be abused by a malicious actor to potentially extract information about server side resources. Submitting a crafted URL (in place of a valid image) can raise a server side error, which is reported back to the user. \n\nThis error message may contain sensitive information about the server side request, including information about the availability of the remote resource.\n\n### Patches\n\nThe solution to this vulnerability is to prevent the server from returning any specific information about the observed exception. Instead, a generic error message is returned to the client.\n\nThis patch has been applied to the upcoming 0.17.0 release, and also back-ported to the 0.16.5 stable release.\n\n### Workarounds\n\nTo avoid this issue with unpatched versions, the \"download image from remote URL\" feature can be disabled in InvenTree, preventing users from accessing this information. \n\n### References\n\nThanks to @febin0x10 for identifying this vulnerability and reporting it to us as per our security policy.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "inventree"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.16.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/inventree/InvenTree/security/advisories/GHSA-vx3h-qwqw-r2wq"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/inventree/InvenTree/commit/5759b60a48e7e178fb417a900ed543f29dc5dc86"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/inventree/InvenTree"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-02T17:58:44Z",
    "nvd_published_at" : null
  }
}