Vulnerabilities in pkg:gem/turbo_boost-commands

PACKAGE
Advisory Identifier: GHSA-mp76-7w5v-pr75
Advisory Summary

CVE-2024-28181 is a HIGH (CVSS 8.1) turboboost commands vulnerable to arbitrary vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Turbo boost commands libraries in the RubyGems ecosystem. The issue involves turboboost commands vulnerable to arbitrary method invocation. Remediation is available by upgrading affected packages to version 0.1.3, 0.2.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/turbo_boost-commands

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-mp76-7w5v-pr75 CVE-2024-28181 HIGH TurboBoost Commands vulnerable to arbitrary method invocation

CVE-2024-28181 at a Glance

CVE Identifier CVE-2024-28181
GHSA Identifier GHSA-mp76-7w5v-pr75
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Turbo boost commands
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 8.1

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

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
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-28181

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

turbo_boost-commands fixed: 0.1.3
Upgrade turbo_boost-commands to 0.1.3
turbo_boost-commands fixed: 0.2.2
Upgrade turbo_boost-commands to 0.2.2
@turbo-boost/commands fixed: 0.1.3
npm install @turbo-boost/commands@0.1.3
@turbo-boost/commands fixed: 0.2.2
npm install @turbo-boost/commands@0.2.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 turbo_boost-commands

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-28181, inspect your project dependencies for Turbo boost commands:

inspect dependencies for turbo_boost-commands

Analyze the terminal output to locate any version of Turbo boost commands in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.3), 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Turbo boost commands, 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 TurboBoost Commands has existing protections in place to guarantee that only public methods on Command classes can be invoked; however, the existing checks aren't as robust as they should be. It's possible for a sophisticated attacker to invoke more methods than should be permitted depending on the the strictness of authorization checks that individual applications enforce. Being able to call some of these methods can have security implications. #### Details Commands verify that the class must be a `Command` and that the method requested is defined as a public method; however, this isn't robust enough to guard against all unwanted code execution. The library should more strictly enforce which methods are considered safe before allowing them to be executed. ### Patches Patched in the following versions. - 0.1.3 - [NPM Package](https://www.npmjs.com/package/@turbo-boost/commands/v/0.1.3) - [Ruby GEM](https://rubygems.org/gems/turbo_boost-commands/versions/0.1.3) - 0.2.2 - [NPM Package](https://www.npmjs.com/package/@turbo-boost/commands/v/0.2.2) - [Ruby GEM](https://rubygems.org/gems/turbo_boost-commands/versions/0.2.2) ### Workarounds You can add this guard to mitigate the issue if running an unpatched version of the library. ```ruby class ApplicationCommand < TurboBoost::Commands::Command before_command do method_name = params[:name].include?("#") ? params[:name].split("#").last : :perform ancestors = self.class.ancestors[0..self.class.ancestors.index(TurboBoost::Commands::Command) - 1] allowed = ancestors.any? { |a| a.public_instance_methods(false).any? method_name.to_sym } throw :abort unless allowed # ← blocks invocation # raise "Invalid Command" unless allowed # ← blocks invocation end end ```

CVE-2024-28181 Affected Turbo boost commands Versions

4 component(s)
Fixed Versions:
0.1.30.2.2
Product / Package Ecosystem Affected Versions Fixed Version
turbo_boost-commands
RubyGems
< 0.1.3
0.1.3
turbo_boost-commands
RubyGems
≥ 0.2.0
< 0.2.2
0.2.2
@turbo-boost/commands
npm
< 0.1.3
0.1.3
@turbo-boost/commands
npm
≥ 0.2.0
< 0.2.2
0.2.2

References

Frequently Asked Questions

What is CVE-2024-28181?
CVE-2024-28181 is a security vulnerability in Turbo boost commands involving TurboBoost Commands vulnerable to arbitrary method invocation under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Turbo boost commands versions are affected?
Affected versions include releases prior to 0.1.3, 0.2.2 across affected packages: turbo_boost-commands, @turbo-boost/commands.
What version fixes CVE-2024-28181?
Upgrading to 0.1.3, 0.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is turbo_boost-commands affected?
Yes, turbo_boost-commands is affected in releases prior to 0.1.3, 0.2.2. Upgrade your dependency to 0.1.3, 0.2.2 or later.
Is @turbo-boost/commands affected?
Yes, @turbo-boost/commands is affected in releases prior to 0.1.3, 0.2.2. Upgrade your dependency to 0.1.3, 0.2.2 or later.
What is the CVSS score of CVE-2024-28181?
CVE-2024-28181 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-28181?
CVE-2024-28181 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check RubyGems dependencies for CVE-2024-28181?
Run the dependency tree command: 'inspect dependencies for turbo_boost-commands'. 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-mp76-7w5v-pr75",
  "modified" : "2024-03-18T16:48:24Z",
  "published" : "2024-03-15T19:53:50Z",
  "aliases" : [ "CVE-2024-28181" ],
  "summary" : "TurboBoost Commands vulnerable to arbitrary method invocation",
  "details" : "### Impact\nTurboBoost Commands has existing protections in place to guarantee that only public methods on Command classes can be invoked; however, the existing checks aren't as robust as they should be. It's possible for a sophisticated attacker to invoke more methods than should be permitted depending on the the strictness of authorization checks that individual applications enforce. Being able to call some of these methods can have security implications.\n\n#### Details\nCommands verify that the class must be a `Command` and that the method requested is defined as a public method; however, this isn't robust enough to guard against all unwanted code execution. The library should more strictly enforce which methods are considered safe before allowing them to be executed.  \n\n### Patches\nPatched in the following versions.\n- 0.1.3\n  - [NPM Package](https://www.npmjs.com/package/@turbo-boost/commands/v/0.1.3)\n  - [Ruby GEM](https://rubygems.org/gems/turbo_boost-commands/versions/0.1.3)\n- 0.2.2\n  - [NPM Package](https://www.npmjs.com/package/@turbo-boost/commands/v/0.2.2)\n  - [Ruby GEM](https://rubygems.org/gems/turbo_boost-commands/versions/0.2.2)\n\n\n### Workarounds\nYou can add this guard to mitigate the issue if running an unpatched version of the library.\n\n```ruby\nclass ApplicationCommand < TurboBoost::Commands::Command\n  before_command do\n    method_name = params[:name].include?(\"#\") ? params[:name].split(\"#\").last : :perform\n    ancestors = self.class.ancestors[0..self.class.ancestors.index(TurboBoost::Commands::Command) - 1]\n    allowed = ancestors.any? { |a| a.public_instance_methods(false).any? method_name.to_sym }\n    throw :abort unless allowed # ← blocks invocation\n    # raise \"Invalid Command\" unless allowed # ← blocks invocation\n  end\nend\n```\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "turbo_boost-commands"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "turbo_boost-commands"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.0"
      }, {
        "fixed" : "0.2.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@turbo-boost/commands"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@turbo-boost/commands"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.0"
      }, {
        "fixed" : "0.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/hopsoft/turbo_boost-commands/security/advisories/GHSA-mp76-7w5v-pr75"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-28181"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hopsoft/turbo_boost-commands/commit/337cda7d9222f1f449905454a7374222017a7477"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hopsoft/turbo_boost-commands/commit/88af4fc0ac39cc1799d16c49fab52f6dfbcec9ba"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/hopsoft/turbo_boost-commands"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/turbo_boost-commands/CVE-2024-28181.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-15T19:53:50Z",
    "nvd_published_at" : "2024-03-14T18:15:07Z"
  }
}