Skip to content

fix(cve): extract referenced vulnerabilities into related instead of aliases - #6287

Closed
jess-lowe wants to merge 1 commit into
google:masterfrom
jess-lowe:investigate_cve_finding_aliases
Closed

jess-lowe wants to merge 1 commit into
google:masterfrom
jess-lowe:investigate_cve_finding_aliases

Conversation

@jess-lowe

Copy link
Copy Markdown
Contributor

Description

Update ExtractReferencedVulns in vulnfeeds so that all referenced GHSA-* and SNYK-* vulnerability IDs extracted from reference URLs are placed into the related field instead of conditionally being added to aliases.

Motivation & Background

Previously, ExtractReferencedVulns only placed extracted identifiers into related if more than one match was found (len > 1), while single matches were placed into aliases. This caused issues:

  1. False Transitive Aliasing: If multiple distinct CVEs each referenced the same single umbrella advisory (e.g. a shared GitHub advisory covering several CVEs), each CVE would record that GHSA in its own aliases. OSV's relations job computes transitive connected components of aliases, causing distinct CVEs to be merged into the same alias group and falsely aliased to each other.
  2. Dangling SNYK Identifiers: OSV does not ingest Snyk advisories as a primary source, so SNYK-* IDs in aliases resulted in dangling alias identifiers without backing records in OSV. Placing them in related correctly references them without affecting alias resolution.
  3. Redundancy with Authoritative Sources: GitHub Security Advisories already declare their corresponding CVEs in their own aliases field. Because OSV's relations service computes aliases bidirectionally (A.aliases = [B] <=> B.aliases = [A]), the CVE record automatically receives legitimate GHSA aliases from the ingested GHSA records without needing to infer aliases from CVE reference URLs.

The id != cveID alias check is preserved so that wrapper converters (such as cmd/pypi creating PYSEC-* IDs) continue to record their underlying CVE ID in aliases.

…aliases

Update ExtractReferencedVulns to place all GHSA and SNYK identifiers extracted from CVE reference URLs into the `related` field rather than conditionally placing single matches into `aliases`.

Previously, when a CVE referenced only a single GHSA or SNYK URL, ExtractReferencedVulns added that identifier to `aliases`. However, if multiple distinct CVEs each referenced the same single umbrella advisory, OSV's transitive alias computation (`relations`) would merge those distinct CVEs into the same alias group. Because ingested GHSA records already declare their corresponding CVE aliases and the `relations` service computes aliases bidirectionally, extracting aliases from CVE reference URLs is redundant for valid aliases while risking false transitive aliasing.
@jess-lowe jess-lowe closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant