You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting in v0.88.0, Grype seems to set a vulnerability as its own related vulnerability. In other words, within a match, the vulnerability (and all of its data) is repeated within the relatedVulnerabilities array.
This seems like a material change in semantics of the output. I'm not sure if this was intentional a lot, but it's strange on the consumer end. We'll now need to filter out related vulnerabilities that appear to be duplicates of the main record.
It also means that result data gets a lot larger because of all the redundancy.
What you expected to happen:
Related vulnerabilities should only be vulnerabilities distinct from (but of course, upstream records or aliases of) the primary vulnerability.
How to reproduce it (as minimally and precisely as possible):
v0.87.0
$ grype -q alpine:3.13 -o json | jq '.matches | first | {vulnerability, relatedVulnerabilities}'{ "vulnerability": { "id": "CVE-2022-48174", "dataSource": "https://nvd.nist.gov/vuln/detail/CVE-2022-48174", "namespace": "nvd:cpe", "severity": "Critical", "urls": [ "https://bugs.busybox.net/show_bug.cgi?id=15216", "https://bugs.busybox.net/show_bug.cgi?id=15216", "https://security.netapp.com/advisory/ntap-20241129-0001/" ], "description": "There is a stack overflow vulnerability in ash.c:6030 in busybox before 1.35. In the environment of Internet of Vehicles, this vulnerability can be executed from command to arbitrary code execution.", "cvss": [ { "source": "nvd@nist.gov", "type": "Primary", "version": "3.1", "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "metrics": { "baseScore": 9.8, "exploitabilityScore": 3.9, "impactScore": 5.9 }, "vendorMetadata": {} } ], "fix": { "versions": [], "state": "unknown" }, "advisories": [] }, "relatedVulnerabilities": []}
v0.88.0 and v0.89.0
$ grype -q alpine:3.13 -o json | jq '.matches | first | {vulnerability, relatedVulnerabilities}'{ "vulnerability": { "id": "CVE-2022-48174", "dataSource": "nvd", "namespace": "nvd:cpe", "severity": "Critical", "urls": [ "https://nvd.nist.gov/vuln/detail/CVE-2022-48174", "https://bugs.busybox.net/show_bug.cgi?id=15216", "https://bugs.busybox.net/show_bug.cgi?id=15216", "https://security.netapp.com/advisory/ntap-20241129-0001/" ], "description": "There is a stack overflow vulnerability in ash.c:6030 in busybox before 1.35. In the environment of Internet of Vehicles, this vulnerability can be executed from command to arbitrary code execution.", "cvss": [ { "source": "nvd@nist.gov", "type": "Primary", "version": "3.1", "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "metrics": { "baseScore": 9.8, "exploitabilityScore": 3.9, "impactScore": 5.9 }, "vendorMetadata": {} } ], "epss": [ { "cve": "CVE-2022-48174", "epss": 0.00264, "percentile": 0.6701, "date": "2025-03-06" } ], "fix": { "versions": [], "state": "" }, "advisories": [] }, "relatedVulnerabilities": [ { "id": "CVE-2022-48174", "dataSource": "nvd", "namespace": "nvd:cpe", "severity": "Critical", "urls": [ "https://nvd.nist.gov/vuln/detail/CVE-2022-48174", "https://bugs.busybox.net/show_bug.cgi?id=15216", "https://bugs.busybox.net/show_bug.cgi?id=15216", "https://security.netapp.com/advisory/ntap-20241129-0001/" ], "description": "There is a stack overflow vulnerability in ash.c:6030 in busybox before 1.35. In the environment of Internet of Vehicles, this vulnerability can be executed from command to arbitrary code execution.", "cvss": [ { "source": "nvd@nist.gov", "type": "Primary", "version": "3.1", "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "metrics": { "baseScore": 9.8, "exploitabilityScore": 3.9, "impactScore": 5.9 }, "vendorMetadata": {} } ], "epss": [ { "cve": "CVE-2022-48174", "epss": 0.00264, "percentile": 0.6701, "date": "2025-03-06" } ] } ]}
Anything else we need to know?:
Environment:
Output of grype version:
$ grype versionApplication: grypeVersion: [not provided]BuildDate: [not provided]GitCommit: [not provided]GitDescription: [not provided]Platform: darwin/arm64GoVersion: go1.24.1Compiler: gcSyft Version: v1.20.0Supported DB Schema: 6
$ git statusHEAD detached at v0.88.0nothing to commit, working tree clean
OS (e.g: cat /etc/os-release or similar): macOS
The text was updated successfully, but these errors were encountered:
luhring
changed the title
Grype results sets a vulnerability as its own related vulnerability
Grype results set a vulnerability as its own related vulnerability
Mar 7, 2025
What happened:
Starting in v0.88.0, Grype seems to set a vulnerability as its own related vulnerability. In other words, within a match, the vulnerability (and all of its data) is repeated within the
relatedVulnerabilities
array.This seems like a material change in semantics of the output. I'm not sure if this was intentional a lot, but it's strange on the consumer end. We'll now need to filter out related vulnerabilities that appear to be duplicates of the main record.
It also means that result data gets a lot larger because of all the redundancy.
What you expected to happen:
Related vulnerabilities should only be vulnerabilities distinct from (but of course, upstream records or aliases of) the primary vulnerability.
How to reproduce it (as minimally and precisely as possible):
v0.87.0
v0.88.0 and v0.89.0
Anything else we need to know?:
Environment:
grype version
:cat /etc/os-release
or similar): macOSThe text was updated successfully, but these errors were encountered: