# CVE-2024-42482: fish-shop/syntax-check Improper Neutralization of Delimiters

> Attackers can inject arbitrary commands via the pattern input in the fish-shop syntax-check GitHub Action, potentially exposing sensitive workflow data.

- **Severity:** Medium 4.8 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Aug 2024
- **Updated:** 13 Aug 2024
- **Also known as:** GHSA-xj87-mqvh-88w2

## What is CVE-2024-42482?

CVE-2024-42482 is a medium-severity command injection vulnerability in fish-shop syntax-check, published on 12 Aug 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

fish-shop/syntax-check is a GitHub action for syntax checking fish shell files. Improper neutralization of delimiters in the `pattern` input (specifically the command separator `;` and command substitution characters `(` and `)`) mean that arbitrary command injection is possible by modification of the input value used in a workflow. This has the potential for exposure or exfiltration of sensitive information from the workflow runner, such as might be achieved by sending environment variables to an external entity. It is recommended that users update to the patched version `v1.6.12` or the latest release version `v2.0.0`, however remediation may be possible through careful control of workflows and the `pattern` input value used by this action.

Weakness: CWE-140 (Improper Neutralization of Delimiters)

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

1 open source package ship an affected version, including fish-shop/syntax-check. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `fish-shop/syntax-check` | GitHub Actions | All versions | 1.6.12 |

Products: Fish-Shop Syntax-Check.

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

Upgrade fish-shop/syntax-check to 1.6.12 or later.

## Is CVE-2024-42482 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2024-42482 is a medium-severity command injection vulnerability in fish-shop syntax-check, published on 12 Aug 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-42482 in the wild and no public exploit code.

Affected packages and fixed versions:
- fish-shop/syntax-check (GitHub Actions): affected all versions; fixed in 1.6.12

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-42482/ (Markdown: https://insights.sbomify.com/CVE-2024-42482/index.md)
```

## Sources

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

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