# GHSA-pr59-jjr4-gcf6: Lack of sufficient checks in public API

> Unsound API checks in the unmaintained anon-vec crate allow memory corruption, potentially leading to code execution or crashes.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Not stated
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 6 May 2025
- **Also known as:** RUSTSEC-2025-0039

## What is GHSA-pr59-jjr4-gcf6?

GHSA-pr59-jjr4-gcf6 is a memory corruption vulnerability in anon-vec, published on 6 May 2025. 

### Official description

The following functions in the anon-vec crate are unsound due to insufficient checks on their
arguments::

- `AnonVec::get_ref()`
- `AnonVec::get_mut()`
- `AnonVec::remove_get()`

The crate was built as a learning project and is not being maintained.

## Which versions are affected by GHSA-pr59-jjr4-gcf6?

3 open source packages ship an affected version, including anon-vec.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `anon-vec` | crates.io | All versions to 0.1.1 | None |
| `anon-vec` | crates.io | All versions to 0.1.1 | None |
| `anon-vec` | crates.io | From 0.0.0-0 | None |

## How do I fix GHSA-pr59-jjr4-gcf6?

No fix has been published for GHSA-pr59-jjr4-gcf6 yet. Limit exposure of the affected software until one is available.

## Is GHSA-pr59-jjr4-gcf6 being exploited?

There is no known exploitation of GHSA-pr59-jjr4-gcf6 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-pr59-jjr4-gcf6 and fix it if it is affected.

What it is: GHSA-pr59-jjr4-gcf6 is a memory corruption vulnerability in anon-vec, published on 6 May 2025. 
Exploitation: There is no known exploitation of GHSA-pr59-jjr4-gcf6 in the wild and no public exploit code.

Affected packages and fixed versions:
- anon-vec (crates.io): affected all versions up to 0.1.1; no fix listed
- anon-vec (crates.io): affected all versions up to 0.1.1; no fix listed
- anon-vec (crates.io): affected from 0.0.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-pr59-jjr4-gcf6/ (Markdown: https://insights.sbomify.com/GHSA-pr59-jjr4-gcf6/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-pr59-jjr4-gcf6

---
From sbomify Insights: https://insights.sbomify.com/GHSA-pr59-jjr4-gcf6/
Summaries are generated and may contain mistakes; the official description above is the record.
