Vulnerabilities in pkg:gem/request_store

PACKAGE
Advisory Identifier: GHSA-frp2-5qfc-7r8m
Advisory Summary

CVE-2024-43791 is a MODERATE (CVSS 7.8) request_store has incorrect default permissions vulnerability (CWE-276: Incorrect Default Permissions) affecting Request store libraries in the RubyGems ecosystem. The issue involves request_store has incorrect default permissions. Remediation is available by upgrading affected packages to version 1.4.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/request_store

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-frp2-5qfc-7r8m CVE-2024-43791 MODERATE request_store has Incorrect Default Permissions

CVE-2024-43791 at a Glance

CVE Identifier CVE-2024-43791
GHSA Identifier GHSA-frp2-5qfc-7r8m
Severity MODERATE
CVSS v3.1 Base Score 7.8
CWE Classification CWE-276: Incorrect Default Permissions
Affected Product Request store
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.8

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

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

How to Fix CVE-2024-43791

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

request_store fixed: 1.4.0
Upgrade request_store to 1.4.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 request_store

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-43791, inspect your project dependencies for Request store:

inspect dependencies for request_store

Analyze the terminal output to locate any version of Request store in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.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-276: Incorrect Default Permissions, where during installation, installed file permissions are set to allow anyone to modify those files. In Request store, 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 files published as part of request_store 1.3.2 have 0666 permissions, meaning that they are world-writable, which allows local users to execute arbitrary code. This version was published in 2017, and most production environments do not allow access for local users, so the chances of this being exploited are very low, given that the vast majority of users will have upgraded, and those that have not, if any, are not likely to be exposed. ### Patches I am not aware of any other version of the gem with incorrect permissions, so simply upgrading should fix the issue. ### Workarounds You could chmod the files yourself, I guess. ### References https://cwe.mitre.org/data/definitions/276.html

CVE-2024-43791 Affected Request store Versions

1 component(s)
Fixed Versions:
1.4.0
Product / Package Ecosystem Affected Versions Fixed Version
request_store
RubyGems
≥ 1.3.2
< 1.4.0
All 1 versions
1.3.2
1.4.0

References

Frequently Asked Questions

What is CVE-2024-43791?
CVE-2024-43791 is a security vulnerability in Request store involving request_store has Incorrect Default Permissions under CWE-276: Incorrect Default Permissions.
Which Request store versions are affected?
Affected versions include releases prior to 1.4.0 across affected packages: request_store.
What version fixes CVE-2024-43791?
Upgrading to 1.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is request_store affected?
Yes, request_store is affected in releases prior to 1.4.0. Upgrade your dependency to 1.4.0 or later.
What is the CVSS score of CVE-2024-43791?
CVE-2024-43791 has a CVSS v3.1 base score of 7.8 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-43791?
CVE-2024-43791 is classified under CWE-276: Incorrect Default Permissions (During installation, installed file permissions are set to allow anyone to modify those files.).
How can I check RubyGems dependencies for CVE-2024-43791?
Run the dependency tree command: 'inspect dependencies for request_store'. 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-frp2-5qfc-7r8m",
  "modified" : "2024-08-26T14:12:40Z",
  "published" : "2024-08-23T18:54:26Z",
  "aliases" : [ "CVE-2024-43791" ],
  "summary" : "request_store has Incorrect Default Permissions",
  "details" : "### Impact\n\nThe files published as part of request_store 1.3.2 have 0666 permissions, meaning that they are world-writable, which allows local users to execute arbitrary code.\n\nThis version was published in 2017, and most production environments do not allow access for local users, so the chances of this being exploited are very low, given that the vast majority of users will have upgraded, and those that have not, if any, are not likely to be exposed.\n\n### Patches\n\nI am not aware of any other version of the gem with incorrect permissions, so simply upgrading should fix the issue.\n\n### Workarounds\n\nYou could chmod the files yourself, I guess.\n\n### References\n\nhttps://cwe.mitre.org/data/definitions/276.html",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "request_store"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.2"
      }, {
        "fixed" : "1.4.0"
      } ]
    } ],
    "versions" : [ "1.3.2" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/steveklabnik/request_store/security/advisories/GHSA-frp2-5qfc-7r8m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-43791"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/request_store/CVE-2024-43791.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/steveklabnik/request_store"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-276" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-23T18:54:26Z",
    "nvd_published_at" : "2024-08-23T15:15:16Z"
  }
}