CVE-2021-32645: Hyn/multi tenant Open Redirect Vulnerability

MODERATE
Advisory Identifier: GHSA-4r8q-gv9j-3xx6
CVSS 4.3
CWE-601
Published
Advisory Summary

CVE-2021-32645 is a MODERATE (CVSS 4.3) open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Hyn/multi tenant libraries in the Packagist ecosystem. The issue involves open redirect. Remediation is available by upgrading affected packages to version 5.7.2.

CVE-2021-32645 at a Glance

CVE Identifier CVE-2021-32645
GHSA Identifier GHSA-4r8q-gv9j-3xx6
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Hyn/multi tenant
Package Ecosystem Packagist
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.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N).

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

How to Fix CVE-2021-32645

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

hyn/multi-tenant fixed: 5.7.2
Upgrade hyn/multi-tenant to 5.7.2
Verify Direct and Transitive Dependencies

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

inspect dependencies for hyn/multi-tenant

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-32645, inspect your project dependencies for Hyn/multi tenant:

inspect dependencies for hyn/multi-tenant

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Hyn/multi tenant, 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 In some situations, it is possible to have open redirects where users can be redirected from your site to any other site using a specially crafted URL. This is only the case for installations where the default Hostname Identification is used and the environment uses tenants that have `force_https` set to `true` (default: `false`) ### Patches Version 5.7.2 contains the relevant patches to fix this bug. Stripping the URL from special characters to prevent specially crafted URL's from being redirected to. ### Workarounds There is a simple way to work around the security issue - Set the `force_https` to every tenant to `false` ### References https://nvd.nist.gov/vuln/detail/CVE-2018-11784 ### For more information If you have any questions or comments about this advisory: * Contact us in Discord: https://tenancy.dev/chat

CVE-2021-32645 Affected Hyn/multi tenant Versions

1 component(s)
Fixed Versions:
5.7.2
Product / Package Ecosystem Affected Versions Fixed Version
hyn/multi-tenant
Packagist
≥ 5.6.0
< 5.7.2
5.7.2

References

Frequently Asked Questions

What is CVE-2021-32645?
CVE-2021-32645 is a security vulnerability in Hyn/multi tenant involving Open Redirect under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Hyn/multi tenant versions are affected?
Affected versions include releases prior to 5.7.2 across affected packages: hyn/multi-tenant.
What version fixes CVE-2021-32645?
Upgrading to 5.7.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hyn/multi-tenant affected?
Yes, hyn/multi-tenant is affected in releases prior to 5.7.2. Upgrade your dependency to 5.7.2 or later.
What is the CVSS score of CVE-2021-32645?
CVE-2021-32645 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2021-32645?
CVE-2021-32645 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check Packagist dependencies for CVE-2021-32645?
Run the dependency tree command: 'inspect dependencies for hyn/multi-tenant'. 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-4r8q-gv9j-3xx6",
  "modified" : "2022-03-18T17:55:07Z",
  "published" : "2022-03-18T17:55:07Z",
  "aliases" : [ "CVE-2021-32645" ],
  "summary" : "Open Redirect",
  "details" : "### Impact\nIn some situations, it is possible to have open redirects where users can be redirected from your site to any other site using a specially crafted URL.\nThis is only the case for installations where the default Hostname Identification is used and the environment uses tenants that have `force_https` set to `true` (default: `false`)\n\n### Patches\nVersion 5.7.2 contains the relevant patches to fix this bug. Stripping the URL from special characters to prevent specially crafted URL's from being redirected to.\n\n### Workarounds\nThere is a simple way to work around the security issue\n- Set the `force_https` to every tenant to `false`\n\n### References\nhttps://nvd.nist.gov/vuln/detail/CVE-2018-11784\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Contact us in Discord: https://tenancy.dev/chat\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "hyn/multi-tenant"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.6.0"
      }, {
        "fixed" : "5.7.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tenancy/multi-tenant/security/advisories/GHSA-4r8q-gv9j-3xx6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32645"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tenancy/multi-tenant/commit/9c837a21bccce9bcaeb90033ef200d84f0d9e164"
  }, {
    "type" : "WEB",
    "url" : "https://packagist.org/packages/hyn/multi-tenant"
  }, {
    "type" : "WEB",
    "url" : "https://webmasters.googleblog.com/2009/01/open-redirect-urls-is-your-site-being.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-27T20:40:11Z",
    "nvd_published_at" : "2021-05-27T17:15:00Z"
  }
}