# CVE-2026-24846: malcontent's archive extraction could write outside extraction directory

> Attackers can write files outside the extraction directory via crafted archives, potentially leading to code execution or privilege escalation.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 29 Jan 2026
- **Updated:** 29 Jan 2026
- **Also known as:** GHSA-923j-vrcg-hxwh, GO-2026-4391

## What is CVE-2026-24846?

CVE-2026-24846 is a medium-severity path traversal vulnerability in chainguard-dev malcontent, published on 29 Jan 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

malcontent discovers supply-chain compromises through. context, differential analysis, and YARA. Starting in version 1.8.0 and prior to version 1.20.3, malcontent could be made to create symlinks outside the intended extraction directory when scanning a specially crafted tar or deb archive. The `handleSymlink` function received arguments in the wrong order, causing the symlink target to be used as the symlink location. Additionally, symlink targets were not validated to ensure they resolved within the extraction directory. Version 1.20.3 introduces fixes that swap handleSymlink arguments, validate symlink location, and validate symlink targets that resolve within an extraction directory.

Weakness: CWE-683 (Function Call With Incorrect Order of Arguments), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-24846?

3 open source packages ship an affected version, including github.com/chainguard-dev/malcontent. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/chainguard-dev/malcontent` | Go | From 1.8.0 | 1.20.3 |
| `github.com/chainguard-dev/malcontent` | Go | From 1.8.0 | 1.20.3 |
| `github.com/chainguard-dev/malcontent` | Go | From 1.8.0 | 1.20.3 |

Products: Chainguard Malcontent.

## How do I fix CVE-2026-24846?

Upgrade github.com/chainguard-dev/malcontent to 1.20.3 or later.

## Is CVE-2026-24846 being exploited?

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

## Other vulnerabilities in chainguard-dev malcontent

- [CVE-2026-28407](https://insights.sbomify.com/CVE-2026-28407/): malcontent's nested archive extraction failure can drop content from scan inputs (medium 6.9)
- [CVE-2026-24845](https://insights.sbomify.com/CVE-2026-24845/): malcontent's OCI image scanning could expose registry credentials (medium 6.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-24846 and fix it if it is affected.

What it is: CVE-2026-24846 is a medium-severity path traversal vulnerability in chainguard-dev malcontent, published on 29 Jan 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-24846 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/chainguard-dev/malcontent (Go): affected from 1.8.0; fixed in 1.20.3
- github.com/chainguard-dev/malcontent (Go): affected from 1.8.0; fixed in 1.20.3
- github.com/chainguard-dev/malcontent (Go): affected from 1.8.0; fixed in 1.20.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/CVE-2026-24846/ (Markdown: https://insights.sbomify.com/CVE-2026-24846/index.md)
```

## Sources

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

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