# CVE-2025-65965: Grype has a credential disclosure vulnerability in Grype JSON output

> Grype leaks registry credentials in JSON output files when specific output options are used, exposing sensitive authentication data to anyone with file access.

- **Severity:** High 8.2 (`CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 Nov 2025
- **Updated:** 25 Nov 2025
- **Also known as:** BELL-CVE-2025-65965, GHSA-6gxw-85q2-q646, GO-2025-4160, MINI-9mwm-3m23-xfh5

## What is CVE-2025-65965?

CVE-2025-65965 is a high-severity vulnerability in anchore grype, published on 25 Nov 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Grype is a vulnerability scanner for container images and filesystems. A credential disclosure vulnerability was found in Grype, affecting versions 0.68.0 through 0.104.0. If registry credentials are defined and the output of grype is written using the --file or --output json=<file> option, the registry credentials will be included unsanitized in the output file. This issue has been patched in version 0.104.1. Users running affected versions of grype can work around this vulnerability by redirecting stdout to a file instead of using the --file or --output options.

Weakness: CWE-212 (Improper Removal of Sensitive Information Before Storage or Transfer)

## Which versions are affected by CVE-2025-65965?

3 open source packages ship an affected version, including github.com/anchore/grype.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/anchore/grype` | Go | From 0.68.0 | 0.104.1 |
| `github.com/anchore/grype` | Go | From 0.68.0 | 0.104.1 |
| `github.com/anchore/grype` | Go | From 0.68.0 | 0.104.1 |

## How do I fix CVE-2025-65965?

Upgrade github.com/anchore/grype to 0.104.1 or later.

## Is CVE-2025-65965 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-65965 and fix it if it is affected.

What it is: CVE-2025-65965 is a high-severity vulnerability in anchore grype, published on 25 Nov 2025. 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-2025-65965 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/anchore/grype (Go): affected from 0.68.0; fixed in 0.104.1
- github.com/anchore/grype (Go): affected from 0.68.0; fixed in 0.104.1
- github.com/anchore/grype (Go): affected from 0.68.0; fixed in 0.104.1

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

## Sources

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

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