# GHSA-3jhm-87m6-x959: Path traversal mitigation bypass in OctoRPKI

> An attacker can bypass path traversal filters in OctoRPKI to write files outside the cache directory by providing a malicious TAL file.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 Jun 2022
- **Also known as:** GO-2022-0496

## What is GHSA-3jhm-87m6-x959?

GHSA-3jhm-87m6-x959 is a path traversal vulnerability in github.com/cloudflare/cfrpki, published on 25 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact
The existing URI path filters in OctoRPKI (version < 1.4.3) mitigating Path traversal vulnerability could be bypassed by an attacker. In case a malicious TAL file is parsed, it was possible to write files outside the base cache folder.

### Specific Go Packages Affected
github.com/cloudflare/cfrpki/cmd/octorpki

### Patches
The issue was fixed in version 1.4.3

### References
[CVE-2021-3907](https://www.cvedetails.com/cve/CVE-2021-3907/)

## Which versions are affected by GHSA-3jhm-87m6-x959?

3 open source packages ship an affected version, including github.com/cloudflare/cfrpki.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cloudflare/cfrpki` | Go | All versions | 1.4.3 |
| `github.com/cloudflare/cfrpki` | Go | All versions | 1.4.3 |
| `github.com/cloudflare/cfrpki` | Go | All versions | 1.4.3 |

## How do I fix GHSA-3jhm-87m6-x959?

Upgrade github.com/cloudflare/cfrpki to 1.4.3 or later.

## Is GHSA-3jhm-87m6-x959 being exploited?

There is no known exploitation of GHSA-3jhm-87m6-x959 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-3jhm-87m6-x959 and fix it if it is affected.

What it is: GHSA-3jhm-87m6-x959 is a path traversal vulnerability in github.com/cloudflare/cfrpki, published on 25 Jun 2022. 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-3jhm-87m6-x959 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cloudflare/cfrpki (Go): affected all versions; fixed in 1.4.3
- github.com/cloudflare/cfrpki (Go): affected all versions; fixed in 1.4.3
- github.com/cloudflare/cfrpki (Go): affected all versions; fixed in 1.4.3

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-3jhm-87m6-x959/ (Markdown: https://insights.sbomify.com/GHSA-3jhm-87m6-x959/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-3jhm-87m6-x959

---
From sbomify Insights: https://insights.sbomify.com/GHSA-3jhm-87m6-x959/
Summaries are generated and may contain mistakes; the official description above is the record.
