{"id":"CVE-2025-65965","aliases":["CVE-2025-65965","GHSA-6gxw-85q2-q646","GO-2025-4160"],"related":["CGA-cgr5-gq3c-hmmv"],"kind":"vulnerability","state":"published","title":"Grype has a credential disclosure vulnerability in Grype JSON output","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"A credential disclosure vulnerability was found in Grype, affecting versions `v0.68.0` through `v0.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.\n\n## Impact\n\nIn Grype versions `v0.68.0` through `v0.104.0`, when registry authentication is configured, those credentials can be incorrectly included in the output of a Grype scan (regardless of whether those credentials are actively being used for the current scan). Users that do not have registry authentication configured are not affected by this issue.\n\nRegistry credentials can be set via the Grype configuration file (e.g. `registry.auth[].username`, `registry.auth[].password`, `registry.auth[].token`) or environment variables (e.g., `GRYPE_REGISTRY_AUTH_USERNAME`, `GRYPE_REGISTRY_AUTH_PASSWORD`, `GRYPE_REGISTRY_AUTH_TOKEN`).\n\nIn order for the authentication details to be improperly included, the Grype file output format must be set to `json` with output target set to a file. For example `--output json=file.json` or `--output json --file file.json`. When these conditions are met, the configured credentials are not sanitized as they should be in the resulting JSON output file.\n\nThe authentication details could also be leaked via a malformed Grype Template. A Grype Template that includes the `Descriptor.Registry.Auth` fields would also include the unsanitized registry credentials. There are no known templates that include these fields.\n\n## Patches\nThe patch has been released in `v0.104.1`.\n\n## Workaround\nUsers running affected versions of grype can work around this vulnerability by redirecting stdout to a file instead of using the `--file` or `--output` options.\n\nFor example, replacing the command:\n\n```\n# using `--output json=path` (or `--file`) leaks credentials\ngrype --output json=test.json alpine:latest\n```\n\nwith\n\n```\n# no use of `--output json=path` or `--file`. Output is sanitized...\ngrype --output json alpine:latest > test.json\n```\n\n...results in the same `test.json` output, but the credentials will be properly sanitized.\n\n## Resources\nPatch pull request: https://github.com/anchore/grype/pull/3068","format":"markdown","source":"ghsa"},{"lang":"en","text":"Grype has a credential disclosure vulnerability in its JSON output in github.com/anchore/grype","format":"markdown","source":"go"},{"lang":"es","text":"Grype es un escáner de vulnerabilidades para imágenes de contenedores y sistemas de archivos. Se encontró una vulnerabilidad de divulgación de credenciales en Grype, que afecta a las versiones 0.68.0 a 0.104.0. Si las credenciales del registro están definidas y la salida de Grype se escribe utilizando la opción '--file' o '--output json=<file>', las credenciales del registro se incluirán sin sanitizar en el archivo de salida. Este problema ha sido parcheado en la versión 0.104.1. Los usuarios que ejecutan versiones afectadas de Grype pueden solucionar esta vulnerabilidad redirigiendo stdout a un archivo en lugar de usar las opciones '--file' o '--output'.","source":"nvd"}],"published":"2025-11-25T14:18:46.000Z","modified":"2026-10-18T20:10:00.110Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"}],"cwes":["CWE-212"],"affected":[{"ranges":[{"version":">= 0.68.0, < 0.104.1","status":"affected"}],"vendor":"anchore","product":"grype","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.68.0","status":"affected","fixed":"0.104.1"}],"ecosystem":"Go","package":"github.com/anchore/grype","purl":"pkg:golang/github.com/anchore/grype","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.68.0","status":"affected","fixed":"0.104.1"}],"ecosystem":"Go","package":"github.com/anchore/grype","purl":"pkg:golang/github.com/anchore/grype","source":"go"}],"references":[{"url":"https://github.com/anchore/grype/security/advisories/GHSA-6gxw-85q2-q646","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/anchore/grype/pull/3068","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/anchore/grype/commit/39f7fa17af2739cafe9b27176d4a68f7c05f21c1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-65965","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/anchore/grype/commit/c99f79de49a58dc16d7fd8f35160b169b87db9de","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/anchore/grype","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-11-25T20:08:41.560Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-65965","url":"https://www.cve.org/CVERecord?id=CVE-2025-65965","licence":"CVE Terms of Use","modified":"2025-11-25T20:08:48.709Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6gxw-85q2-q646","url":"https://github.com/advisories/GHSA-6gxw-85q2-q646","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:30.678Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-4160","url":"https://pkg.go.dev/vuln/GO-2025-4160","licence":"CC-BY-4.0","modified":"2026-02-04T03:33:52.311Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-65965","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-65965","licence":"Public domain","modified":"2026-10-18T20:10:00.110Z"}],"updatedAt":"2026-11-25T22:59:08.010Z","epss":{"score":0.0016,"percentile":0.05389,"date":"2026-12-01T12:00:22.000Z"}}