To start with an answer to your question: we had a detailed look at what --by-cve
is doing to make sure it was the right suggestion and, unfortunately, think it’s probably doing something wrong: only taking the first associated CVE and dropping the others, and you would be, in fact, losing data.
This is where things get a little unclear to me, and it’s the same question you have: if an ELSA fixes multiple CVEs, does it mean any package updated by the ELSA means they are vulnerable to every CVE? From the data we have in Grype DB, we can’t differentiate anything beyond this, and we have to assume that every CVE is, in fact, applicable. This probably isn’t what you wanted to hear, but this is the current state of ELSA processing, Grype DB, and Grype matching.
I think there are 2 potential things we could do to make this more accurate and granular:
1. adjust the provider to create multiple ELSA records at ingestion time, one for each package affected and only associate the appropriate CVE that would make the correct package, but this doesn’t seem as though it’s happening today.
The Vunnel provider responsible for reading the ELSA data is here: vunnel/src/vunnel/providers/oracle/parser.py at main · anchore/vunnel · GitHub
And if I look at some of the ELSA records, however, I don’t see how we can figure out anything more granular about CVE associations directly from this data; is there something I’m missing – maybe a different data source we should be using?
<definition id="oval:com.oracle.elsa:def:20252673" version="501" class="patch">
<metadata>
<title>
ELSA-2025-2673: libxml2 security update (IMPORTANT)
</title>
<affected family="unix">
<platform>Oracle Linux 7</platform>
</affected>
<reference source="elsa" ref_id="ELSA-2025-2673" ref_url="https://linux.oracle.com/errata/ELSA-2025-2673.html"/>
<reference source="CVE" ref_id="CVE-2024-56171" ref_url="https://linux.oracle.com/cve/CVE-2024-56171.html"/>
<reference source="CVE" ref_id="CVE-2025-24928" ref_url="https://linux.oracle.com/cve/CVE-2025-24928.html"/>
<description>
[2.9.1-6.0.5]
- Fix CVE-2024-56171 [Orabug: 37694105]
- Fix CVE-2025-24928 [Orabug: 37694105]
...
[2.9.1-6.5]
- Fix CVE-2019-19956 (#1793000)
- Fix CVE-2019-20388 (#1810057)
- Fix CVE-2020-7595 (#1810073)
- Fix xsd:any schema validation (#1812145)
...
- upstream release 2.6.25 broken, do not ship !
</description>
<advisory>
<severity>IMPORTANT</severity>
<rights>Copyright 2025 Oracle, Inc.</rights>
<issued date="2025-03-20"/>
<cve cvss3="8.1/CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H" href="https://linux.oracle.com/cve/CVE-2024-56171.html" public="20250218">CVE-2024-56171</cve>
<cve cvss3="7.8/CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N" href="https://linux.oracle.com/cve/CVE-2025-24928.html" public="20250218">CVE-2025-24928</cve>
<affected_cpe_list>
<cpe>cpe:/a:oracle:linux:7:9:latest_ELS</cpe>
</affected_cpe_list>
</advisory>
</metadata>
<criteria operator="AND">
<criterion test_ref="oval:com.oracle.elsa:tst:20252673001" comment="Oracle Linux 7 is installed"/>
<criteria operator="AND">
<criterion test_ref="oval:com.oracle.elsa:tst:20252673002" comment="Oracle Linux arch is x86_64"/>
<criteria operator="OR">
<criteria operator="AND">
<criterion test_ref="oval:com.oracle.elsa:tst:20252673003" comment="libxml2 is earlier than 0:2.9.1-6.0.5.el7_9.6"/>
<criterion test_ref="oval:com.oracle.elsa:tst:20252673004" comment="libxml2 is signed with the Oracle Linux 7 key"/>
</criteria>
<criteria operator="AND">
<criterion test_ref="oval:com.oracle.elsa:tst:20252673005" comment="libxml2-devel is earlier than 0:2.9.1-6.0.5.el7_9.6"/>
<criterion test_ref="oval:com.oracle.elsa:tst:20252673006" comment="libxml2-devel is signed with the Oracle Linux 7 key"/>
</criteria>
<criteria operator="AND">
<criterion test_ref="oval:com.oracle.elsa:tst:20252673007" comment="libxml2-python is earlier than 0:2.9.1-6.0.5.el7_9.6"/>
<criterion test_ref="oval:com.oracle.elsa:tst:20252673008" comment="libxml2-python is signed with the Oracle Linux 7 key"/>
</criteria>
<criteria operator="AND">
<criterion test_ref="oval:com.oracle.elsa:tst:20252673009" comment="libxml2-static is earlier than 0:2.9.1-6.0.5.el7_9.6"/>
<criterion test_ref="oval:com.oracle.elsa:tst:20252673010" comment="libxml2-static is signed with the Oracle Linux 7 key"/>
</criteria>
</criteria>
</criteria>
</criteria>
</definition>
...
<rpminfo_test id="oval:com.oracle.elsa:tst:20252673009" version="501" comment="libxml2-static is earlier than 0:2.9.1-6.0.5.el7_9.6" check="at least one" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
2. the second option which may not be mutually exclusive to option 1 is to adjust the matcher in Grype to only treat ELSA data as advisories, which they are, rather than vulnerability disclosures, and instead of using this to match, use NVD data to match, and then filter out fixed records based on the ELSA fix information, or something similar.
We try to avoid using NVD data to match with as there are some challenges, but it may work in this case.
We are currently in the process of making some changes to the matching process in Grype, so this is great input that can help inform what we do!