Vulnerabilities in pkg:gem/rails_multisite

PACKAGE
Advisory Identifier: GHSA-844m-cpr9-jcmh
Advisory Summary

CVE-2021-41263 is a MODERATE (CVSS 6.2) rails multisite secure/signed cookies share vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Rails multisite libraries in the RubyGems ecosystem. The issue involves rails multisite secure/signed cookies share secrets between sites in a multi-site application. Remediation is available by upgrading affected packages to version 4.0.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/rails_multisite

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/rails_multisite. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-844m-cpr9-jcmh CVE-2021-41263 MODERATE Rails Multisite secure/signed cookies share secrets between sites in a multi-site application

CVE-2021-41263 at a Glance

CVE Identifier CVE-2021-41263
GHSA Identifier GHSA-844m-cpr9-jcmh
Severity MODERATE
CVSS v3.1 Base Score 6.2
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Rails multisite
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 6.2

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

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

How to Fix CVE-2021-41263

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

rails_multisite fixed: 4.0.0
Upgrade rails_multisite to 4.0.0
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 rails_multisite

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-41263, inspect your project dependencies for Rails multisite:

inspect dependencies for rails_multisite

Analyze the terminal output to locate any version of Rails multisite in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.0), 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-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Rails multisite, 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 This vulnerability impacts any Rails applications using `rails_multisite` alongside Rails' signed/encrypted cookies. Depending on how the application makes use of these cookies, it may be possible for an attacker to re-use cookies on different 'sites' within a multi-site Rails application. ### Patches The issue has been patched in v4 of the `rails_multisite` gem. Note that this upgrade will invalidate all previous signed/encrypted cookies. The impact of this invalidation will vary based on the application architecture.

CVE-2021-41263 Affected Rails multisite Versions

1 component(s)
Fixed Versions:
4.0.0
Product / Package Ecosystem Affected Versions Fixed Version
rails_multisite
RubyGems
< 4.0.0
4.0.0

References

Frequently Asked Questions

What is CVE-2021-41263?
CVE-2021-41263 is a security vulnerability in Rails multisite involving Rails Multisite secure/signed cookies share secrets between sites in a multi-site application under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Rails multisite versions are affected?
Affected versions include releases prior to 4.0.0 across affected packages: rails_multisite.
What version fixes CVE-2021-41263?
Upgrading to 4.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rails_multisite affected?
Yes, rails_multisite is affected in releases prior to 4.0.0. Upgrade your dependency to 4.0.0 or later.
What is the CVSS score of CVE-2021-41263?
CVE-2021-41263 has a CVSS v3.1 base score of 6.2 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:L/A:H.
What CWE is associated with CVE-2021-41263?
CVE-2021-41263 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check RubyGems dependencies for CVE-2021-41263?
Run the dependency tree command: 'inspect dependencies for rails_multisite'. 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-844m-cpr9-jcmh",
  "modified" : "2022-08-11T18:31:09Z",
  "published" : "2021-11-15T17:54:01Z",
  "aliases" : [ "CVE-2021-41263" ],
  "summary" : "Rails Multisite secure/signed cookies share secrets between sites in a multi-site application",
  "details" : "### Impact\nThis vulnerability impacts any Rails applications using `rails_multisite` alongside Rails' signed/encrypted cookies. Depending on how the application makes use of these cookies, it may be possible for an attacker to re-use cookies on different 'sites' within a multi-site Rails application.\n\n### Patches\nThe issue has been patched in v4 of the `rails_multisite` gem. Note that this upgrade will invalidate all previous signed/encrypted cookies. The impact of this invalidation will vary based on the application architecture.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:L/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rails_multisite"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/discourse/rails_multisite/security/advisories/GHSA-844m-cpr9-jcmh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41263"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/discourse/rails_multisite/commit/c6785cdb5c9277dd2c5ac8d55180dd1ece440ed0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/discourse/rails_multisite"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails_multisite/CVE-2021-41263.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-327", "CWE-565" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-11-15T17:53:35Z",
    "nvd_published_at" : "2021-11-15T20:15:00Z"
  }
}