# CVE-2024-28181: Arbitrary method invocation turbo_boost-commands

> An attacker can invoke unauthorized methods in TurboBoost Commands due to insufficient validation, potentially leading to arbitrary code execution.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Mar 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-mp76-7w5v-pr75

## What is CVE-2024-28181?

CVE-2024-28181 is a high-severity code injection vulnerability in hopsoft turbo_boost-commands, published on 14 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

turbo_boost-commands is a set of commands to help you build robust reactive applications with Rails & Hotwire. 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. 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. This issue has been addressed in versions 0.1.3, and 0.2.2. Users are advised to upgrade. Users unable to upgrade should see the repository GHSA for workaround advice.

Weakness: CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component)

## Which versions are affected by CVE-2024-28181?

8 open source packages ship an affected version, including turbo_boost-commands and @turbo-boost/commands. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `turbo_boost-commands` | RubyGems | All versions | 0.1.3 |
| `turbo_boost-commands` | RubyGems | All versions | 0.1.3 |
| `turbo_boost-commands` | RubyGems | From 0.2.0 | 0.2.2 |
| `turbo_boost-commands` | RubyGems | From 0.2.0 | 0.2.2 |
| `@turbo-boost/commands` | npm | All versions | 0.1.3 |
| `@turbo-boost/commands` | npm | All versions | 0.1.3 |
| `@turbo-boost/commands` | npm | From 0.2.0 | 0.2.2 |
| `@turbo-boost/commands` | npm | From 0.2.0 | 0.2.2 |

Products: Turboboost Commands Project Turboboost Commands.

## How do I fix CVE-2024-28181?

Upgrade turbo_boost-commands to a fixed version for your release line: 0.1.3 or 0.2.2.

## Is CVE-2024-28181 being exploited?

There is no known exploitation of CVE-2024-28181 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-28181 and fix it if it is affected.

What it is: CVE-2024-28181 is a high-severity code injection vulnerability in hopsoft turbo_boost-commands, published on 14 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-28181 in the wild and no public exploit code.

Affected packages and fixed versions:
- turbo_boost-commands (RubyGems): affected all versions; fixed in 0.1.3
- turbo_boost-commands (RubyGems): affected all versions; fixed in 0.1.3
- turbo_boost-commands (RubyGems): affected from 0.2.0; fixed in 0.2.2
- turbo_boost-commands (RubyGems): affected from 0.2.0; fixed in 0.2.2
- @turbo-boost/commands (npm): affected all versions; fixed in 0.1.3
- @turbo-boost/commands (npm): affected all versions; fixed in 0.1.3
- @turbo-boost/commands (npm): affected from 0.2.0; fixed in 0.2.2
- @turbo-boost/commands (npm): affected from 0.2.0; fixed in 0.2.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-28181/ (Markdown: https://insights.sbomify.com/CVE-2024-28181/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-28181
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-28181
- OSV: https://osv.dev/vulnerability/CVE-2024-28181

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-28181/
Summaries are generated and may contain mistakes; the official description above is the record.
