# GHSA-jcgr-9698-82jx: Improper Neutralization of Special Elements used in a Command ('Command Injection') in @floffah/build

> Attackers can inject malicious commands via esbuild targets in @floffah/build, potentially compromising project settings and executing code.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 May 2021

## What is GHSA-jcgr-9698-82jx?

GHSA-jcgr-9698-82jx is a command injection vulnerability in @floffah/build, published on 28 May 2021. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

### Impact
If you are using the esbuild target or command you are at risk of code/option injection. Attackers can use the command line option to maliciously change your settings in order to damage your project.

### Patches
The problem has been patched in v1.0.0 as it uses a proper method to pass configs to esbuild/estrella.

### Workarounds
There is no work around. You should update asap.

### Notes
This notice is mainly just to make sure people update to the latest version. This isn't that bad, but should encourage you to update.

## Which versions are affected by GHSA-jcgr-9698-82jx?

2 open source packages ship an affected version, including @floffah/build.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@floffah/build` | npm | All versions | 1.0.0 |
| `@floffah/build` | npm | All versions | 1.0.0 |

## How do I fix GHSA-jcgr-9698-82jx?

Upgrade @floffah/build to 1.0.0 or later.

## Is GHSA-jcgr-9698-82jx being exploited?

There is no known exploitation of GHSA-jcgr-9698-82jx in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-jcgr-9698-82jx and fix it if it is affected.

What it is: GHSA-jcgr-9698-82jx is a command injection vulnerability in @floffah/build, published on 28 May 2021. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-jcgr-9698-82jx in the wild and no public exploit code.

Affected packages and fixed versions:
- @floffah/build (npm): affected all versions; fixed in 1.0.0
- @floffah/build (npm): affected all versions; fixed in 1.0.0

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/GHSA-jcgr-9698-82jx/ (Markdown: https://insights.sbomify.com/GHSA-jcgr-9698-82jx/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-jcgr-9698-82jx

---
From sbomify Insights: https://insights.sbomify.com/GHSA-jcgr-9698-82jx/
Summaries are generated and may contain mistakes; the official description above is the record.
