# GHSA-54p8-x2m9-c593: malcontent: Error-path cleanup gap can leak scanners and fds and degrade availability

> Resource leaks in archive extraction paths can exhaust system resources, leading to denial of service for applications using the malcontent library.

- **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:** 2 Mar 2026
- **Also known as:** GO-2026-4583

## What is GHSA-54p8-x2m9-c593?

GHSA-54p8-x2m9-c593 is a denial of service vulnerability in github.com/chainguard-dev/malcontent, published on 2 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Several extraction and scanning code paths registered late defers which could leak resources and exhaust system resources.

This report is an aggregate of these individual reports for the affected code:
Advisory | Affected File
-- | --
`GHSA-jjgh-mc5q-gch7` | `pkg/action/scan.go`
`GHSA-mwmf-fxh2-w4x7` | `pkg/archive/deb.go`
`GHSA-p8j3-rpf5-gwv3` | `pkg/archive/gzip.go`
`GHSA-qfh4-7f5v-75gq` | `pkg/archive/zlib.go`
`GHSA-wxxf-r586-5rf5` | `pkg/archive/bzip2.go`

**Fix**: #1354, #1355, #1356, #1361

**Acknowledgements**

Thank you to Oleh Konko from [1seal](https://1seal.org/) for discovering and reporting all six of these issues.

## Which versions are affected by GHSA-54p8-x2m9-c593?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/chainguard-dev/malcontent` | Go | All versions | 1.21.0 |
| `github.com/chainguard-dev/malcontent` | Go | All versions | 1.21.0 |
| `github.com/chainguard-dev/malcontent` | Go | All versions | 1.21.0 |

## How do I fix GHSA-54p8-x2m9-c593?

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

## Is GHSA-54p8-x2m9-c593 being exploited?

There is no known exploitation of GHSA-54p8-x2m9-c593 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-54p8-x2m9-c593 and fix it if it is affected.

What it is: GHSA-54p8-x2m9-c593 is a denial of service vulnerability in github.com/chainguard-dev/malcontent, published on 2 Mar 2026. 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-54p8-x2m9-c593 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/chainguard-dev/malcontent (Go): affected all versions; fixed in 1.21.0
- github.com/chainguard-dev/malcontent (Go): affected all versions; fixed in 1.21.0
- github.com/chainguard-dev/malcontent (Go): affected all versions; fixed in 1.21.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/GHSA-54p8-x2m9-c593/ (Markdown: https://insights.sbomify.com/GHSA-54p8-x2m9-c593/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-54p8-x2m9-c593

---
From sbomify Insights: https://insights.sbomify.com/GHSA-54p8-x2m9-c593/
Summaries are generated and may contain mistakes; the official description above is the record.
