🛡️ CVE-2024-28181 — turbo-boost-commands
Description
TurboBoost Commands vulnerable to arbitrary method invocation
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
```
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is high, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability high.
Weakness class
CVE-2024-28181 is classified as 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…
Affected software
CVE-2024-28181 is recorded against 3 packages.
- @turbo-boost/commands
- turbo-boost-commands (from 0.2.0 up to 0.2.2)
- turboboost-commands (from 0.2.0 up to 0.2.2)
Timeline and source
Published on 15 March 2024 and last revised on 18 March 2024. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.
References
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)
Details
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| @turbo-boost/commands | — | — |
| turbo-boost-commands | 0.2.0 | 0.2.2 |
| turboboost-commands | 0.2.0 | 0.2.2 |
References
Site Security Check
Is turbo-boost-commands part of your stack?
CVE-2024-28181 is rated CVSS 8.1 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.