# CVE-2022-4969: bwoodsend rockhopper Binary Parser ragged_array.c count_rows buffer overflow

> A buffer overflow in the rockhopper binary parser allows local attackers to execute arbitrary code or cause denial of service via crafted input.

- **Severity:** Medium 4.8 (`CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 May 2024
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-4r4c-66gf-g9g5, PYSEC-2026-1875

## What is CVE-2022-4969?

CVE-2022-4969 is a medium-severity memory corruption vulnerability in bwoodsend rockhopper, published on 27 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A vulnerability, which was classified as critical, has been found in bwoodsend rockhopper up to 0.1.2. Affected by this issue is the function count_rows of the file rockhopper/src/ragged_array.c of the component Binary Parser. The manipulation of the argument raw leads to buffer overflow. Local access is required to approach this attack. Upgrading to version 0.2.0 is able to address this issue. The name of the patch is 1a15fad5e06ae693eb9b8908363d2c8ef455104e. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-266312.

Weakness: CWE-120 (Buffer Copy without Checking Size of Input)

## Which versions are affected by CVE-2022-4969?

3 open source packages ship an affected version, including rockhopper.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rockhopper` | PyPI | All versions | 0.2.0 |
| `rockhopper` | PyPI | All versions | 0.2.0 |
| `rockhopper` | PyPI | All versions | 0.2.0 |

## How do I fix CVE-2022-4969?

Upgrade rockhopper to 0.2.0 or later.

## Is CVE-2022-4969 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-4969 and fix it if it is affected.

What it is: CVE-2022-4969 is a medium-severity memory corruption vulnerability in bwoodsend rockhopper, published on 27 May 2024. 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 CVE-2022-4969 in the wild and no public exploit code.

Affected packages and fixed versions:
- rockhopper (PyPI): affected all versions; fixed in 0.2.0
- rockhopper (PyPI): affected all versions; fixed in 0.2.0
- rockhopper (PyPI): affected all versions; fixed in 0.2.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/CVE-2022-4969/ (Markdown: https://insights.sbomify.com/CVE-2022-4969/index.md)
```

## Sources

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

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