# GHSA-c2p2-hgjg-9r3f: Crayfish Allows Remote Code Execution via hypercube X-Islandora-Args Header

> Remote attackers can execute arbitrary code on web-accessible Crayfish hypercube installations via the X-Islandora-Args header.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 12 Feb 2025

## What is GHSA-c2p2-hgjg-9r3f?

GHSA-c2p2-hgjg-9r3f is a command injection vulnerability in islandora/crayfish, published on 12 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact
_What kind of vulnerability is it? Who is impacted?_

Remote code execution is possible in web-accessible installations of hypercube. 

### Patches
_Has the problem been patched? What versions should users upgrade to?_

Not yet, though no patch is neccessary if your installation of the microservices is behind a firewall.  See below.

### Workarounds
_Is there a way for users to fix or remediate the vulnerability without upgrading?_

The exploit requires making a request against Hypercube's endpoints; therefore, the ability to make use of the exploit is much reduced if the microservice is not directly accessible from the Internet, so: Prevent general access from the Internet from hitting Hypercube.  Furthermore, if you've used any of the official installation methods, your Crayfish will be behind a firewall and there is no work neccessary.

The webserver might be made to validate the structure of headers passed, but that would only be neccessary if you publicly exposed the endpoint. Standard security practices should be applied.

### References
_Are there any links users can visit to find out more?_

- XBOW-024-074

## Which versions are affected by GHSA-c2p2-hgjg-9r3f?

2 open source packages ship an affected version, including islandora/crayfish.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `islandora/crayfish` | Packagist | All versions to 4.0.0 | None |
| `islandora/crayfish` | Packagist | All versions to 4.0.0 | None |

## How do I fix GHSA-c2p2-hgjg-9r3f?

No fix has been published for GHSA-c2p2-hgjg-9r3f yet. Limit exposure of the affected software until one is available.

## Is GHSA-c2p2-hgjg-9r3f being exploited?

There is no known exploitation of GHSA-c2p2-hgjg-9r3f in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-c2p2-hgjg-9r3f and fix it if it is affected.

What it is: GHSA-c2p2-hgjg-9r3f is a command injection vulnerability in islandora/crayfish, published on 12 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-c2p2-hgjg-9r3f in the wild and no public exploit code.

Affected packages and fixed versions:
- islandora/crayfish (Packagist): affected all versions up to 4.0.0; no fix listed
- islandora/crayfish (Packagist): affected all versions up to 4.0.0; no fix listed

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-c2p2-hgjg-9r3f/ (Markdown: https://insights.sbomify.com/GHSA-c2p2-hgjg-9r3f/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-c2p2-hgjg-9r3f

---
From sbomify Insights: https://insights.sbomify.com/GHSA-c2p2-hgjg-9r3f/
Summaries are generated and may contain mistakes; the official description above is the record.
