# CVE-2024-1485: Registry-support: decompress can delete files outside scope via relative paths

> An attacker can trick a user into parsing a malicious devfile to delete or overwrite files outside the intended scope via path traversal in the decompression function.

- **Severity:** High 8.0 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 13 Feb 2024
- **Updated:** 6 Aug 2026
- **Also known as:** GHSA-84xv-jfrm-h4gm, GO-2024-2576

## What is CVE-2024-1485?

CVE-2024-1485 is a high-severity path traversal vulnerability in Redhat Openshift, published on 13 Feb 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A flaw was found in the decompression function of registry-support. This issue can be triggered if an unauthenticated remote attacker tricks a user into parsing a devfile which uses the `parent` or `plugin` keywords. This could download a malicious archive and cause the cleanup process to overwrite or delete files outside of the archive, which should not be allowed.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

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

3 open source packages ship an affected version, including github.com/devfile/registry-support/registry-library. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/devfile/registry-support/registry-library` | Go | All versions | None |
| `github.com/devfile/registry-support/registry-library` | Go | All versions | 0.0.0-20240206 |
| `github.com/devfile/registry-support/registry-library` | Go | All versions | 0.0.0-20240206 |

Products: Devfile Registry-Support, Redhat Openshift, Redhat Openshift Developer Tools and Services.

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

Upgrade github.com/devfile/registry-support/registry-library to 0.0.0-20240206 or later.

## Is CVE-2024-1485 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2024-1485 is a high-severity path traversal vulnerability in Redhat Openshift, published on 13 Feb 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2024-1485 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/devfile/registry-support/registry-library (Go): affected all versions; no fix listed
- github.com/devfile/registry-support/registry-library (Go): affected all versions; fixed in 0.0.0-20240206
- github.com/devfile/registry-support/registry-library (Go): affected all versions; fixed in 0.0.0-20240206

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

## Sources

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

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