<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Ghsa | FirewallSync</title><link>https://firewallsync.com/tags/ghsa/</link><description>Practical cybersecurity writing for engineering teams that ship fast.</description><language>en-us</language><image><url>https://firewallsync.com/icon-512.png</url><title>FirewallSync</title><link>https://firewallsync.com/</link></image><lastBuildDate>Fri, 04 Dec 2026 04:30:00 +0000</lastBuildDate><atom:link href="https://firewallsync.com/tags/ghsa/index.xml" rel="self" type="application/rss+xml"/><item><title>PYSEC vs GHSA vs CVE: Dedupe pip-audit Before KEV and EPSS</title><link>https://firewallsync.com/posts/pysec-vs-ghsa-vs-cve-dedupe-pip-audit-before-kev-epss/</link><guid>https://firewallsync.com/posts/pysec-vs-ghsa-vs-cve-dedupe-pip-audit-before-kev-epss/</guid><pubDate>Fri, 04 Dec 2026 04:30:00 +0000</pubDate><dc:creator>Craig Leslie</dc:creator><category>Security Operations</category><description>One PyPI vulnerability can carry a PYSEC ID, a GHSA ID and a CVE ID. pip-audit 2.10.1 printed 58 rows for 33 distinct vulnerabilities in langflow 1.2.0. This guide shows how the three IDs relate, why the duplicates appear, and a tested script that collapses them before the KEV and EPSS join.</description><enclosure url="https://firewallsync.com/posts/pysec-vs-ghsa-vs-cve-dedupe-pip-audit-before-kev-epss/cover_hu7858856609729277200.jpg" type="image/jpeg" length="0"/><media:content url="https://firewallsync.com/posts/pysec-vs-ghsa-vs-cve-dedupe-pip-audit-before-kev-epss/cover_hu7858856609729277200.jpg" medium="image" type="image/jpeg" width="1200" height="630"/><content:encoded><![CDATA[<p><img src="https://firewallsync.com/posts/pysec-vs-ghsa-vs-cve-dedupe-pip-audit-before-kev-epss/cover_hu7858856609729277200.jpg" alt="Dozens of bundled newspaper stacks tied with white string, piled in columns against a pale wall" width="1200" height="630"></p><p><strong>Short answer:</strong> PYSEC, GHSA and CVE are three identifiers from three different databases, and one PyPI vulnerability often carries all three. Scanners such as pip-audit report whichever ID they prefer, and in our test pip-audit 2.10.1 printed the same vulnerability twice under one PYSEC ID. Before you count findings, open tickets or join to <a href="/posts/cisa-kev-json-feed-what-each-field-means-and-how-to-match-it-against-a-scanner-export/">CISA KEV</a> and <a href="/posts/epss-data-feed-columns-percentile-vs-probability-and-how-to-join-it-to-a-scanner-export/">EPSS</a>, merge rows whose <code>id</code> and <code>aliases</code> overlap, then use the CVE in each merged cluster as the join key.</p>
<p>This is the Python counterpart to our <a href="/posts/ghsa-vs-cve-join-github-advisories-to-kev-and-epss/">GHSA vs CVE join guide</a>. The full patch-decision flow, from CVE record to ticket, is in the <a href="/posts/vulnerability-prioritization-workflow-cve-record-to-patch-ticket/">vulnerability prioritization workflow</a>.</p>
<h2 id="method">Method</h2>
<ul>
<li><strong>PyPA Advisory Database</strong> at commit <code>6c98d1c</code> (2 December 2026): every <code>vulns/*/*.yaml</code> file, parsed with PyYAML.</li>
<li><strong>GitHub Advisory Database</strong>, <code>advisories/github-reviewed</code> at commit <code>bf333b9</code> (4 December 2026): every OSV JSON file with at least one <code>affected[].package.ecosystem</code> equal to <code>PyPI</code>.</li>
<li><strong>CISA KEV</strong> catalog version 2026.11.30 (1,810 entries) from <code>cisagov/kev-data</code>.</li>
<li><strong>FIRST EPSS</strong> daily file for 2026-12-03 (model <code>v2026.06.15</code>) from <code>empiricalsec/epss_scores</code>.</li>
<li><strong>pip-audit 2.10.1</strong> (the latest release on PyPI on 4 December 2026), run with <code>-r requirements.txt --no-deps --disable-pip -f json</code> against pinned versions, using the default PyPI vulnerability service.</li>
</ul>
<p>Records with a <code>withdrawn</code> timestamp are excluded. We merged records into clusters when any ID or alias was shared (a union-find over <code>id</code> and <code>aliases</code>). All counts below were computed with Python from those files.</p>
<h2 id="three-ids-three-owners">Three IDs, three owners</h2>
<table>
  <thead>
      <tr>
          <th>ID</th>
          <th>Example</th>
          <th>Issued by</th>
          <th>Format</th>
          <th>What it covers</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>PYSEC</td>
          <td><code>PYSEC-2025-36</code></td>
          <td><a href="https://github.com/pypa/advisory-database">Python Packaging Advisory Database</a></td>
          <td>OSV, stored as YAML</td>
          <td>Packages on PyPI only, one record per affected package</td>
      </tr>
      <tr>
          <td>GHSA</td>
          <td><code>GHSA-rvqx-wpfh-mfx7</code></td>
          <td><a href="https://github.com/github/advisory-database">GitHub Advisory Database</a></td>
          <td>OSV JSON</td>
          <td>Many ecosystems; one record can list several packages</td>
      </tr>
      <tr>
          <td>CVE</td>
          <td><code>CVE-2025-3248</code></td>
          <td>CVE Program CNAs</td>
          <td>CVE JSON 5</td>
          <td>Any product; the only key KEV and EPSS use</td>
      </tr>
  </tbody>
</table>
<p>The PyPA README says much of its data is &ldquo;collected from the NVD CVE feed&rdquo; using a tool that &ldquo;performs a lot of heuristics to match CVEs with exact Python packages and versions&rdquo; plus &ldquo;a small amount of human triage&rdquo;. That explains why nearly every PYSEC record has a CVE alias.</p>
<p>Langflow&rsquo;s unauthenticated RCE shows how the IDs fan out. GitHub&rsquo;s advisory <code>GHSA-rvqx-wpfh-mfx7</code> lists two packages, <code>langflow</code> and <code>langflow-base</code>, with one alias, <code>CVE-2025-3248</code>. PyPA has a separate PYSEC record for each package: <code>PYSEC-2025-36</code> for <code>langflow</code> (aliases: the CVE only) and <code>PYSEC-2026-380</code> for <code>langflow-base</code> (aliases: the CVE and the GHSA). One vulnerability, four IDs.</p>
<h2 id="what-the-two-databases-contain">What the two databases contain</h2>
<table>
  <thead>
      <tr>
          <th>Measure</th>
          <th>PyPA (PYSEC)</th>
          <th>GitHub-reviewed (PyPI GHSA)</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Records</td>
          <td>7,943</td>
          <td>6,979</td>
      </tr>
      <tr>
          <td>Withdrawn</td>
          <td>272</td>
          <td>265</td>
      </tr>
      <tr>
          <td>Live</td>
          <td>7,671</td>
          <td>6,714</td>
      </tr>
      <tr>
          <td>Live with a CVE alias</td>
          <td>7,601</td>
          <td>6,316</td>
      </tr>
      <tr>
          <td>Live with a GHSA alias</td>
          <td>7,213</td>
          <td>n/a</td>
      </tr>
      <tr>
          <td>Live with no CVE</td>
          <td>70</td>
          <td>398</td>
      </tr>
  </tbody>
</table>
<p>Two points matter for joins:</p>
<ol>
<li><strong>GitHub&rsquo;s raw files alias only CVEs.</strong> None of the 6,714 live PyPI GHSA files lists a PYSEC ID in <code>aliases</code>. The link from PYSEC to GHSA lives on the PyPA side.</li>
<li><strong>PYSEC is per package.</strong> 608 PyPI GHSAs are aliased by more than one PYSEC record, typically because a project publishes several packages (a main package plus a <code>-base</code> or plugin package).</li>
</ol>
<p>Merging all 14,385 live records on shared IDs gives <strong>7,208 distinct vulnerability clusters</strong>:</p>
<table>
  <thead>
      <tr>
          <th>Cluster contains</th>
          <th>Clusters</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>PYSEC + GHSA + CVE</td>
          <td>6,011</td>
      </tr>
      <tr>
          <td>PYSEC + CVE, no GHSA</td>
          <td>427</td>
      </tr>
      <tr>
          <td>GHSA only (no PYSEC, no CVE)</td>
          <td>361</td>
      </tr>
      <tr>
          <td>GHSA + CVE, no PYSEC</td>
          <td>340</td>
      </tr>
      <tr>
          <td>PYSEC only (no GHSA, no CVE)</td>
          <td>68</td>
      </tr>
      <tr>
          <td>PYSEC + GHSA, no CVE</td>
          <td>1</td>
      </tr>
      <tr>
          <td><strong>Total</strong></td>
          <td><strong>7,208</strong></td>
      </tr>
  </tbody>
</table>
<p>So counting raw records nearly doubles the real number, and neither database is a superset of the other: 495 clusters appear only in PyPA data and 701 only in GitHub data.</p>
<h2 id="where-pip-audits-duplicates-come-from">Where pip-audit&rsquo;s duplicates come from</h2>
<p>pip-audit queries PyPI&rsquo;s JSON API by default (<code>-s pypi</code>). <a href="https://docs.pypi.org/api/json/">PyPI&rsquo;s JSON API documentation</a> shows a <code>vulnerabilities</code> array whose example entries have <code>&quot;source&quot;: &quot;osv&quot;</code> and link to osv.dev. On 4 December 2026, <code>https://pypi.org/pypi/langflow/1.2.0/json</code> returned both <code>PYSEC-2025-36</code> and <code>GHSA-rvqx-wpfh-mfx7</code>, and the GHSA entry&rsquo;s aliases were <code>CVE-2025-3248</code>, <code>PYSEC-2025-36</code> and <code>PYSEC-2026-380</code>. That alias list is richer than GitHub&rsquo;s raw file, which lists only the CVE.</p>
<p>Reading pip-audit 2.10.1&rsquo;s source explains what happens next:</p>
<ul>
<li><code>VulnerabilityResult.create()</code> sorts each result&rsquo;s IDs so that <strong>PYSEC comes first, then CVE, then everything else</strong>, and uses the first one as the primary <code>id</code>. The GHSA entry therefore becomes a result whose primary ID is <code>PYSEC-2025-36</code>.</li>
<li>The dedupe loop in <code>_audit.py</code> makes a <strong>first pass that adds every result whose ID starts with <code>PYSEC</code></strong>, without checking aliases. Only the second pass, for non-PYSEC results, merges on overlapping aliases.</li>
</ul>
<p>Both results now start with <code>PYSEC</code>, so both are kept. The run confirmed it:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>$ pip-audit -r requirements.txt --no-deps --disable-pip
</span></span><span style="display:flex;"><span>Found 58 known vulnerabilities in 1 package
</span></span><span style="display:flex;"><span>Name     Version ID                  Fix Versions
</span></span><span style="display:flex;"><span>-------- ------- ------------------- ------------
</span></span><span style="display:flex;"><span>langflow 1.2.0   PYSEC-2025-36       1.3.0
</span></span><span style="display:flex;"><span>langflow 1.2.0   PYSEC-2025-36       1.3.0
</span></span><span style="display:flex;"><span>langflow 1.2.0   PYSEC-2025-243      1.5.1
</span></span><span style="display:flex;"><span>...
</span></span></code></pre></div><table>
  <thead>
      <tr>
          <th>Package (pinned)</th>
          <th>pip-audit rows</th>
          <th>Distinct vulnerabilities after merge</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>langflow 1.2.0</td>
          <td>58</td>
          <td>33</td>
      </tr>
      <tr>
          <td>mlflow 2.10.0</td>
          <td>95</td>
          <td>49</td>
      </tr>
      <tr>
          <td>litellm 1.60.0</td>
          <td>34</td>
          <td>24</td>
      </tr>
      <tr>
          <td>starlette 0.40.0</td>
          <td>14</td>
          <td>7</td>
      </tr>
  </tbody>
</table>
<p>For langflow, 25 PYSEC IDs appeared twice, and one GHSA-only row (<code>GHSA-j8f7-x8jm-wmm4</code>) had no CVE. We could not test the <code>-s osv</code> service because <code>api.osv.dev</code> was not reachable from our environment, so we make no claim about its output. We found no open pip-audit issue about this on 4 December 2026; if you rely on pip-audit&rsquo;s count as a metric, check it against a merged count.</p>
<h2 id="the-dedupe-then-join-script">The dedupe-then-join script</h2>
<p>This script reads pip-audit JSON (which includes <code>aliases</code> by default for the JSON format), merges rows into clusters, and joins KEV and EPSS on the CVE IDs in each cluster. It uses only the Python standard library. We ran it with Python 3.13 on the outputs above.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#e6db74">&#34;&#34;&#34;Collapse pip-audit JSON rows into one finding per vulnerability, then join KEV and EPSS.
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">Usage: python3 dedupe_pip_audit.py audit.json known_exploited_vulnerabilities.json epss_scores-YYYY-MM-DD.csv.gz
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> csv<span style="color:#f92672">,</span> gzip<span style="color:#f92672">,</span> json<span style="color:#f92672">,</span> sys
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>audit, kev_path, epss_path <span style="color:#f92672">=</span> sys<span style="color:#f92672">.</span>argv[<span style="color:#ae81ff">1</span>:<span style="color:#ae81ff">4</span>]
</span></span><span style="display:flex;"><span>kev <span style="color:#f92672">=</span> {v[<span style="color:#e6db74">&#34;cveID&#34;</span>]: v <span style="color:#66d9ef">for</span> v <span style="color:#f92672">in</span> json<span style="color:#f92672">.</span>load(open(kev_path))[<span style="color:#e6db74">&#34;vulnerabilities&#34;</span>]}
</span></span><span style="display:flex;"><span>epss <span style="color:#f92672">=</span> {}
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">with</span> gzip<span style="color:#f92672">.</span>open(epss_path, <span style="color:#e6db74">&#34;rt&#34;</span>) <span style="color:#66d9ef">as</span> fh:
</span></span><span style="display:flex;"><span>    next(fh)  <span style="color:#75715e"># &#39;#model_version:...,score_date:...&#39; comment line</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">for</span> row <span style="color:#f92672">in</span> csv<span style="color:#f92672">.</span>DictReader(fh):
</span></span><span style="display:flex;"><span>        epss[row[<span style="color:#e6db74">&#34;cve&#34;</span>]] <span style="color:#f92672">=</span> float(row[<span style="color:#e6db74">&#34;epss&#34;</span>])
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">for</span> dep <span style="color:#f92672">in</span> json<span style="color:#f92672">.</span>load(open(audit))[<span style="color:#e6db74">&#34;dependencies&#34;</span>]:
</span></span><span style="display:flex;"><span>    clusters <span style="color:#f92672">=</span> []  <span style="color:#75715e"># each cluster is a set of IDs (PYSEC, GHSA, CVE, ...)</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">for</span> v <span style="color:#f92672">in</span> dep<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;vulns&#34;</span>, []):
</span></span><span style="display:flex;"><span>        ids <span style="color:#f92672">=</span> {v[<span style="color:#e6db74">&#34;id&#34;</span>], <span style="color:#f92672">*</span>v[<span style="color:#e6db74">&#34;aliases&#34;</span>]}
</span></span><span style="display:flex;"><span>        hits <span style="color:#f92672">=</span> [c <span style="color:#66d9ef">for</span> c <span style="color:#f92672">in</span> clusters <span style="color:#66d9ef">if</span> c <span style="color:#f92672">&amp;</span> ids]
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">for</span> c <span style="color:#f92672">in</span> hits:
</span></span><span style="display:flex;"><span>            ids <span style="color:#f92672">|=</span> c
</span></span><span style="display:flex;"><span>            clusters<span style="color:#f92672">.</span>remove(c)
</span></span><span style="display:flex;"><span>        clusters<span style="color:#f92672">.</span>append(ids)
</span></span><span style="display:flex;"><span>    print(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#39;</span><span style="color:#e6db74">{</span>dep[<span style="color:#e6db74">&#34;name&#34;</span>]<span style="color:#e6db74">}</span><span style="color:#e6db74"> </span><span style="color:#e6db74">{</span>dep[<span style="color:#e6db74">&#34;version&#34;</span>]<span style="color:#e6db74">}</span><span style="color:#e6db74">: </span><span style="color:#e6db74">{</span>len(dep<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;vulns&#34;</span>, []))<span style="color:#e6db74">}</span><span style="color:#e6db74"> rows -&gt; </span><span style="color:#e6db74">{</span>len(clusters)<span style="color:#e6db74">}</span><span style="color:#e6db74"> vulnerabilities&#39;</span>)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">for</span> ids <span style="color:#f92672">in</span> sorted(clusters, key<span style="color:#f92672">=</span><span style="color:#66d9ef">lambda</span> c: <span style="color:#f92672">-</span>max((epss<span style="color:#f92672">.</span>get(i, <span style="color:#ae81ff">0</span>) <span style="color:#66d9ef">for</span> i <span style="color:#f92672">in</span> c), default<span style="color:#f92672">=</span><span style="color:#ae81ff">0</span>)):
</span></span><span style="display:flex;"><span>        cves <span style="color:#f92672">=</span> sorted(i <span style="color:#66d9ef">for</span> i <span style="color:#f92672">in</span> ids <span style="color:#66d9ef">if</span> i<span style="color:#f92672">.</span>startswith(<span style="color:#e6db74">&#34;CVE-&#34;</span>))
</span></span><span style="display:flex;"><span>        in_kev <span style="color:#f92672">=</span> [c <span style="color:#66d9ef">for</span> c <span style="color:#f92672">in</span> cves <span style="color:#66d9ef">if</span> c <span style="color:#f92672">in</span> kev]
</span></span><span style="display:flex;"><span>        score <span style="color:#f92672">=</span> max((epss<span style="color:#f92672">.</span>get(c, <span style="color:#ae81ff">0.0</span>) <span style="color:#66d9ef">for</span> c <span style="color:#f92672">in</span> cves), default<span style="color:#f92672">=</span><span style="color:#66d9ef">None</span>)
</span></span><span style="display:flex;"><span>        key <span style="color:#f92672">=</span> cves[<span style="color:#ae81ff">0</span>] <span style="color:#66d9ef">if</span> cves <span style="color:#66d9ef">else</span> sorted(ids)[<span style="color:#ae81ff">0</span>]
</span></span><span style="display:flex;"><span>        print(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#39;  </span><span style="color:#e6db74">{</span>key<span style="color:#e6db74">:</span><span style="color:#e6db74">18</span><span style="color:#e6db74">}</span><span style="color:#e6db74"> kev=</span><span style="color:#e6db74">{</span><span style="color:#e6db74">&#34;yes&#34;</span> <span style="color:#66d9ef">if</span> in_kev <span style="color:#66d9ef">else</span> <span style="color:#e6db74">&#34;no &#34;</span><span style="color:#e6db74">:</span><span style="color:#e6db74">3</span><span style="color:#e6db74">}</span><span style="color:#e6db74"> epss=</span><span style="color:#e6db74">{</span>score <span style="color:#66d9ef">if</span> score <span style="color:#f92672">is</span> <span style="color:#f92672">not</span> <span style="color:#66d9ef">None</span> <span style="color:#66d9ef">else</span> <span style="color:#e6db74">&#34;n/a (no CVE)&#34;</span><span style="color:#e6db74">}</span><span style="color:#e6db74"> ids=</span><span style="color:#e6db74">{</span><span style="color:#e6db74">&#34;,&#34;</span><span style="color:#f92672">.</span>join(sorted(ids <span style="color:#f92672">-</span> {key}))<span style="color:#e6db74">}</span><span style="color:#e6db74">&#39;</span>)
</span></span></code></pre></div><p>Output for langflow 1.2.0 (first lines):</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>langflow 1.2.0: 58 rows -&gt; 33 vulnerabilities
</span></span><span style="display:flex;"><span>  CVE-2025-3248      kev=yes epss=0.99992 ids=GHSA-rvqx-wpfh-mfx7,PYSEC-2025-36,PYSEC-2026-380
</span></span><span style="display:flex;"><span>  CVE-2026-33017     kev=yes epss=0.96814 ids=GHSA-vwmf-pq79-vjvx,PYSEC-2026-379
</span></span><span style="display:flex;"><span>  CVE-2025-34291     kev=yes epss=0.93656 ids=GHSA-577h-p2hh-v4mv,PYSEC-2025-78
</span></span><span style="display:flex;"><span>  CVE-2026-55255     kev=yes epss=0.69162 ids=GHSA-qrpv-q767-xqq2,PYSEC-2026-221
</span></span><span style="display:flex;"><span>  CVE-2026-0770      kev=yes epss=0.62562 ids=GHSA-g22f-v6f7-2hrh,PYSEC-2026-1525
</span></span></code></pre></div><p>Five of the 33 langflow 1.2.0 vulnerabilities are in KEV. Without the merge, each of those would appear as two tickets under the same PYSEC ID.</p>
<h2 id="kev-and-epss-coverage-for-pypi">KEV and EPSS coverage for PyPI</h2>
<p>Across both databases there are 6,781 distinct CVE IDs attached to live PyPI advisories:</p>
<ul>
<li><strong>6,745</strong> have a score in the 2026-12-03 EPSS file; 192 score 0.1 or higher.</li>
<li><strong>24</strong> are in KEV catalog 2026.11.30. They include Langflow, LiteLLM, MLflow, Apache Airflow, Superset and Spark, Salt, Starlette, Ray and Marimo.</li>
<li><strong>22</strong> of those 24 appear in both PyPA and GitHub data. <code>CVE-2026-102895</code> (GPUStack) had only a GHSA record and <code>CVE-2026-133968</code> (MONAI Label) had only a PYSEC record in our snapshot.</li>
<li><strong>430</strong> clusters have no CVE at all, so KEV and EPSS return nothing for them. Treat those with the approach in our <a href="/posts/ghsa-without-cve-triage-no-cve-github-advisories/">GHSA without a CVE</a> guide.</li>
</ul>
<h2 id="common-mistakes">Common mistakes</h2>
<ul>
<li><strong>Counting rows as vulnerabilities.</strong> pip-audit row counts, and naive unions of PyPA and GitHub data, overstate the real number. Merge first.</li>
<li><strong>Keying tickets on whatever ID the scanner printed.</strong> pip-audit prefers PYSEC; Dependabot shows GHSA; your SBOM tool may show CVE. Store all aliases on the ticket and match new findings on any of them.</li>
<li><strong>Joining KEV on PYSEC or GHSA.</strong> KEV&rsquo;s <code>cveID</code> and EPSS&rsquo;s <code>cve</code> columns hold only CVE IDs. Pull the CVE out of the merged cluster.</li>
<li><strong>Reading only one database.</strong> Each has PyPI vulnerabilities the other lacks, including two KEV-listed CVEs in this snapshot.</li>
</ul>
<h2 id="limits-of-this-article">Limits of this article</h2>
<ul>
<li>Counts are a snapshot of PyPA commit <code>6c98d1c</code> and GitHub commit <code>bf333b9</code>; both databases change daily.</li>
<li>Three clusters contain two CVE IDs (for example, a CVE and a later duplicate CVE). The script keeps every CVE in the cluster and uses the highest EPSS score, which is a conservative choice, not a ruling on which CVE is correct.</li>
<li>The pip-audit duplicate behaviour was observed with version 2.10.1 and the PyPI service only. A future pip-audit release, or a change to the aliases PyPI serves, could change it.</li>
<li>The script is a minimal example. It does not handle <code>--fix</code> output, multiple requirement files or VEX suppression.</li>
</ul>
<h2 id="sources-and-verification">Sources and verification</h2>
<table>
  <thead>
      <tr>
          <th>Important claim</th>
          <th>Source</th>
          <th>Status</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>PyPA advisories are OSV-format YAML, mostly collected from NVD CVE data with heuristics and human triage</td>
          <td><a href="https://github.com/pypa/advisory-database">pypa/advisory-database README</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>Record, withdrawn, alias and cluster counts</td>
          <td><a href="https://github.com/pypa/advisory-database">pypa/advisory-database</a> at <code>6c98d1c</code>; <a href="https://github.com/github/advisory-database">github/advisory-database</a> at <code>bf333b9</code>; computed</td>
          <td>Verified (snapshot)</td>
      </tr>
      <tr>
          <td>PyPI&rsquo;s JSON API returns a <code>vulnerabilities</code> array with OSV-sourced entries and a <code>withdrawn</code> timestamp</td>
          <td><a href="https://docs.pypi.org/api/json/">PyPI JSON API docs</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>pip-audit defaults to the PyPI service, sorts PYSEC then CVE first, and adds all PYSEC results in a first pass</td>
          <td><a href="https://pypi.org/p/pip-audit">pip-audit</a> 2.10.1 source (<code>_cli.py</code>, <code>_service/interface.py</code>, <code>_audit.py</code>)</td>
          <td>Verified (source read)</td>
      </tr>
      <tr>
          <td>langflow 1.2.0: 58 rows, 33 distinct vulnerabilities, 25 duplicated PYSEC IDs</td>
          <td>pip-audit 2.10.1 run, 4 December 2026</td>
          <td>Verified (our run)</td>
      </tr>
      <tr>
          <td>24 PyPI CVEs in KEV; GPUStack and MONAI Label single-source</td>
          <td><a href="https://github.com/cisagov/kev-data">cisagov/kev-data</a> 2026.11.30 joined to both databases</td>
          <td>Verified (snapshot)</td>
      </tr>
      <tr>
          <td>EPSS coverage of PyPI CVEs</td>
          <td><a href="https://github.com/empiricalsec/epss_scores">empiricalsec/epss_scores</a> 2026-12-03 file</td>
          <td>Verified (snapshot)</td>
      </tr>
  </tbody>
</table>
]]></content:encoded></item><item><title>GHSA Without a CVE: Triage 3,693 Advisories KEV Can't See</title><link>https://firewallsync.com/posts/ghsa-without-cve-triage-no-cve-github-advisories/</link><guid>https://firewallsync.com/posts/ghsa-without-cve-triage-no-cve-github-advisories/</guid><pubDate>Thu, 03 Dec 2026 04:30:00 +0000</pubDate><dc:creator>John Marshall</dc:creator><category>Security Operations</category><description>3,693 live GitHub-reviewed advisories have no CVE, so KEV and EPSS return nothing for them. 358 are malware, 31 cite a KEV-listed upstream CVE, 227 are Critical or High with no fixed version. A tested Python triage script sorts them into five buckets.</description><enclosure url="https://firewallsync.com/posts/ghsa-without-cve-triage-no-cve-github-advisories/cover_hu5997438576559820669.jpg" type="image/jpeg" length="0"/><media:content url="https://firewallsync.com/posts/ghsa-without-cve-triage-no-cve-github-advisories/cover_hu5997438576559820669.jpg" medium="image" type="image/jpeg" width="1200" height="630"/><content:encoded><![CDATA[<p><img src="https://firewallsync.com/posts/ghsa-without-cve-triage-no-cve-github-advisories/cover_hu5997438576559820669.jpg" alt="Warehouse with tall blue and orange pallet racks of cardboard boxes, a few loose boxes on the concrete floor" width="1200" height="630"></p><p><strong>Short answer:</strong> A GitHub advisory (GHSA) without a CVE cannot be joined to CISA&rsquo;s KEV catalog or FIRST&rsquo;s EPSS scores, because both are keyed only by CVE ID. On 3 December 2026, <strong>3,693</strong> live GitHub-reviewed advisories were in that state. They are not one population: <strong>358</strong> are malware, <strong>31</strong> cite a known-exploited upstream CVE, <strong>227</strong> are Critical or High with no fixed version, and the rest are ordinary library bugs whose maintainers did not request a CVE. Sort them into those buckets first, then apply severity.</p>
<p>This follows our <a href="/posts/ghsa-vs-cve-join-github-advisories-to-kev-and-epss/">GHSA vs CVE join guide</a>, which joins the 90% of advisories that do have a CVE alias. This article covers the remainder. If you want the full decision flow for CVE-keyed findings, start with the <a href="/posts/vulnerability-prioritization-workflow-cve-record-to-patch-ticket/">vulnerability prioritization workflow</a>.</p>
<h2 id="method">Method</h2>
<ul>
<li><strong>Advisories:</strong> sparse clone of <code>advisories/github-reviewed</code> from <a href="https://github.com/github/advisory-database">github/advisory-database</a>, commit <code>85ddf6c</code> (3 December 2026, 03:35 UTC). 38,222 OSV files; 1,296 have a <code>withdrawn</code> timestamp, leaving 36,926 live.</li>
<li><strong>&ldquo;No CVE&rdquo;</strong> means no entry in <code>aliases</code> starts with <code>CVE-</code>. For all 3,693 such live advisories, <code>aliases</code> is empty.</li>
<li><strong>KEV:</strong> <code>known_exploited_vulnerabilities.json</code> from <a href="https://github.com/cisagov/kev-data">cisagov/kev-data</a>, catalog version 2026.11.30, 1,810 entries.</li>
<li><strong>EPSS:</strong> the 2026-12-02 daily file from the <a href="https://github.com/empiricalsec/epss_scores">EPSS scores repository</a>, model <code>v2026.06.15</code>.</li>
<li>All counts come from the script below or a variation of it run on Python 3.13. Each GHSA is counted once, using its first <code>affected</code> package for ecosystem.</li>
</ul>
<h2 id="why-kev-and-epss-go-silent">Why KEV and EPSS go silent</h2>
<p>Both signals use the CVE ID as their key. The KEV JSON field is <code>cveID</code> (see our <a href="/posts/cisa-kev-json-feed-what-each-field-means-and-how-to-match-it-against-a-scanner-export/">KEV JSON feed field guide</a>); EPSS&rsquo;s first column is <code>cve</code> (see the <a href="/posts/epss-data-feed-columns-percentile-vs-probability-and-how-to-join-it-to-a-scanner-export/">EPSS data feed columns</a>). We checked both files: none of the 1,810 KEV entries and none of the 416,792 EPSS rows uses anything other than a CVE ID.</p>
<p>GitHub&rsquo;s own documentation scopes EPSS the same way: &ldquo;The GitHub Advisory Database includes EPSS scores from FIRST for advisories containing CVEs with corresponding EPSS data.&rdquo; No CVE, no EPSS panel.</p>
<h2 id="who-the-3693-are">Who the 3,693 are</h2>
<table>
  <thead>
      <tr>
          <th>Breakdown</th>
          <th>Count</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Live GitHub-reviewed advisories</td>
          <td>36,926</td>
      </tr>
      <tr>
          <td>No CVE alias</td>
          <td>3,693 (10%)</td>
      </tr>
      <tr>
          <td>Published in 2026</td>
          <td>1,321</td>
      </tr>
      <tr>
          <td>Malware (<code>cwe_ids</code> contains CWE-506)</td>
          <td>358</td>
      </tr>
      <tr>
          <td>No CVSS vector, severity word only</td>
          <td>1,146</td>
      </tr>
      <tr>
          <td>No <code>fixed</code> event in any range</td>
          <td>685</td>
      </tr>
  </tbody>
</table>
<p>By GitHub severity: Moderate 1,368, High 1,168, Critical 689, Low 468. By ecosystem: npm 1,350, Packagist 703, crates.io 484, Go 474, PyPI 394, Maven 109, NuGet 97, RubyGems 55, GitHub Actions 17, SwiftURL 5, Hex 4, Pub 1.</p>
<h3 id="most-are-maintainer-advisories-without-a-cve-request">Most are maintainer advisories without a CVE request</h3>
<p>GitHub&rsquo;s documentation on repository security advisories says &ldquo;GitHub is a CVE Numbering Authority (CNA) and is authorized to assign CVE identification numbers&rdquo;, and that a maintainer &ldquo;can request a CVE identification number from GitHub&rdquo;. It is an option. Of the 1,297 non-malware no-CVE advisories published in 2026, <strong>1,242</strong> link to a <code>github.com/&lt;owner&gt;/&lt;repo&gt;/security/advisories/GHSA-...</code> page, which means a maintainer published them through a repository advisory. The vulnerability is real and reviewed; it simply never got a CVE.</p>
<h3 id="half-the-criticals-are-malware">Half the Criticals are malware</h3>
<p>358 no-CVE advisories carry CWE-506 (Embedded Malicious Code). Their summaries read like &ldquo;Malicious Package in jqeury&rdquo; or &ldquo;Malicious Package in reques&rdquo;, typosquats of popular npm names. 338 are npm, and 324 were published in 2020. 349 are rated Critical, which is <strong>51% of the 689 no-CVE Critical advisories</strong>.</p>
<p>GitHub&rsquo;s docs describe these as &ldquo;advisories about malicious open source packages&rdquo;, say &ldquo;Our malware advisories are mostly about substitution attacks&rdquo;, and state that &ldquo;Malware alerts do not contain a fix version.&rdquo; The data agrees: 338 of the 358 have no <code>fixed</code> event. If your queue sorts no-CVE Criticals by &ldquo;fix available&rdquo;, half of them will sink to the bottom.</p>
<h3 id="some-cite-a-cve-that-is-in-kev">Some cite a CVE that is in KEV</h3>
<p>317 no-CVE advisories mention at least one CVE ID in their <code>details</code> or <code>references</code> without listing it as an alias. Usually the advisory covers a package that <strong>bundles</strong> an upstream component, and the CVE belongs to that upstream component. 31 non-malware advisories mention a CVE that is in KEV, for example:</p>
<table>
  <thead>
      <tr>
          <th>GHSA</th>
          <th>Package</th>
          <th>KEV CVE mentioned</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>GHSA-j646-gj5p-p45g</td>
          <td>CefSharp.Common (NuGet)</td>
          <td>CVE-2023-4863, CVE-2023-5217</td>
      </tr>
      <tr>
          <td>GHSA-f9pm-4g9p-6vm3</td>
          <td>webp (PyPI)</td>
          <td>CVE-2023-4863</td>
      </tr>
      <tr>
          <td>GHSA-m425-mq94-257g</td>
          <td>google.golang.org/grpc (Go)</td>
          <td>CVE-2023-44487</td>
      </tr>
      <tr>
          <td>GHSA-xpw8-rcwv-8f8p</td>
          <td>io.netty:netty-codec-http2 (Maven)</td>
          <td>CVE-2023-44487</td>
      </tr>
      <tr>
          <td>GHSA-q95h-cqrv-8jv5</td>
          <td>exiftool_vendored (RubyGems)</td>
          <td>CVE-2021-22204</td>
      </tr>
  </tbody>
</table>
<p>A mention is not an identity. The advisory may only cite the CVE as background, so read it before you treat the package as exploited. But it is the only path from these advisories to KEV, and a join on <code>aliases</code> misses all 31.</p>
<h3 id="nine-reference-an-nvd-record-anyway">Nine reference an NVD record anyway</h3>
<p>Nine no-CVE advisories have <code>database_specific.nvd_published_at</code> set. GHSA-hh3j-9m59-p8vc (BentoML), for example, has no CVE alias, yet its first reference is the NVD page for CVE-2024-8966. A mention scan catches these too.</p>
<h2 id="a-five-bucket-triage">A five-bucket triage</h2>
<table>
  <thead>
      <tr>
          <th>Bucket</th>
          <th>Rule</th>
          <th>Count</th>
          <th>Action</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>1. Malware</td>
          <td><code>cwe_ids</code> contains CWE-506</td>
          <td>358</td>
          <td>Incident: remove the package, check lockfiles and CI caches, rotate secrets the install could read</td>
      </tr>
      <tr>
          <td>2. Upstream KEV</td>
          <td>Details or references mention a CVE in KEV</td>
          <td>31</td>
          <td>Confirm the bundled component version; patch on the KEV timeline you use for that CVE</td>
      </tr>
      <tr>
          <td>3. Critical/High, fix available</td>
          <td>Severity CRITICAL or HIGH, at least one <code>fixed</code> event</td>
          <td>1,245</td>
          <td>Upgrade on your Critical/High SLA</td>
      </tr>
      <tr>
          <td>4. Critical/High, no fix</td>
          <td>Severity CRITICAL or HIGH, no <code>fixed</code> event</td>
          <td>227</td>
          <td>Mitigate, replace or accept with an owner; re-check weekly</td>
      </tr>
      <tr>
          <td>5. Moderate/Low</td>
          <td>Everything else</td>
          <td>1,832</td>
          <td>Normal SLA</td>
      </tr>
  </tbody>
</table>
<p>Buckets are exclusive and applied in order, so the counts sum to 3,693. In bucket 4, 96 are Critical and 131 High; by ecosystem, npm has 139, crates.io 43, PyPI 18 and Go 15.</p>
<p>The thresholds are editorial choices, not a standard. If you already run <a href="/posts/cisa-vulnrichment-how-to-read-ssvc-values-in-a-cve-record-and-turn-them-into-a-patch-decision/">SSVC</a> decisions, buckets 1 and 2 are the closest analogue to &ldquo;exploitation: active&rdquo;, and the rest have to be decided on exposure and technical impact without CISA&rsquo;s input.</p>
<h2 id="the-triage-script">The triage script</h2>
<p>Tested with Python 3.13 on the three inputs in the Method section. Standard library only. It reads the OSV files from a local clone, skips withdrawn advisories and those with a CVE alias, and writes one CSV row per advisory with the bucket and any KEV CVEs mentioned. Bucket totals go to stderr.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#75715e">#!/usr/bin/env python3</span>
</span></span><span style="display:flex;"><span><span style="color:#e6db74">&#34;&#34;&#34;Bucket GitHub-reviewed advisories that have no CVE alias.
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">Usage: python3 ghsa_no_cve_triage.py &lt;advisory-database-dir&gt; &lt;known_exploited_vulnerabilities.json&gt; &gt; out.csv&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> csv<span style="color:#f92672">,</span> glob<span style="color:#f92672">,</span> json<span style="color:#f92672">,</span> re<span style="color:#f92672">,</span> sys
</span></span><span style="display:flex;"><span><span style="color:#f92672">from</span> collections <span style="color:#f92672">import</span> Counter
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>CVE_RE <span style="color:#f92672">=</span> re<span style="color:#f92672">.</span>compile(<span style="color:#e6db74">r</span><span style="color:#e6db74">&#34;CVE-\d</span><span style="color:#e6db74">{4}</span><span style="color:#e6db74">-\d{4,}&#34;</span>)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">has_fixed</span>(adv):
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> any(<span style="color:#e6db74">&#34;fixed&#34;</span> <span style="color:#f92672">in</span> ev <span style="color:#66d9ef">for</span> a <span style="color:#f92672">in</span> adv<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;affected&#34;</span>, [])
</span></span><span style="display:flex;"><span>               <span style="color:#66d9ef">for</span> r <span style="color:#f92672">in</span> a<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;ranges&#34;</span>, []) <span style="color:#66d9ef">for</span> ev <span style="color:#f92672">in</span> r<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;events&#34;</span>, []))
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">bucket</span>(adv, kev):
</span></span><span style="display:flex;"><span>    ds <span style="color:#f92672">=</span> adv<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;database_specific&#34;</span>, {})
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> <span style="color:#e6db74">&#34;CWE-506&#34;</span> <span style="color:#f92672">in</span> ds<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;cwe_ids&#34;</span>, []):
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> <span style="color:#e6db74">&#34;1-malware: remove package, rotate secrets&#34;</span>, []
</span></span><span style="display:flex;"><span>    text <span style="color:#f92672">=</span> json<span style="color:#f92672">.</span>dumps(adv<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;references&#34;</span>, [])) <span style="color:#f92672">+</span> adv<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;details&#34;</span>, <span style="color:#e6db74">&#34;&#34;</span>)
</span></span><span style="display:flex;"><span>    upstream_kev <span style="color:#f92672">=</span> sorted(set(CVE_RE<span style="color:#f92672">.</span>findall(text)) <span style="color:#f92672">&amp;</span> kev)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> upstream_kev:
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> <span style="color:#e6db74">&#34;2-mentions a KEV CVE: check bundled component&#34;</span>, upstream_kev
</span></span><span style="display:flex;"><span>    sev <span style="color:#f92672">=</span> ds<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;severity&#34;</span>, <span style="color:#e6db74">&#34;UNKNOWN&#34;</span>)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> sev <span style="color:#f92672">in</span> (<span style="color:#e6db74">&#34;CRITICAL&#34;</span>, <span style="color:#e6db74">&#34;HIGH&#34;</span>):
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> (<span style="color:#e6db74">&#34;3-critical/high, fix available&#34;</span> <span style="color:#66d9ef">if</span> has_fixed(adv)
</span></span><span style="display:flex;"><span>                <span style="color:#66d9ef">else</span> <span style="color:#e6db74">&#34;4-critical/high, no fixed version&#34;</span>), []
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> <span style="color:#e6db74">&#34;5-moderate/low: normal SLA&#34;</span>, []
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">main</span>(db_dir, kev_path):
</span></span><span style="display:flex;"><span>    kev <span style="color:#f92672">=</span> {v[<span style="color:#e6db74">&#34;cveID&#34;</span>] <span style="color:#66d9ef">for</span> v <span style="color:#f92672">in</span> json<span style="color:#f92672">.</span>load(open(kev_path))[<span style="color:#e6db74">&#34;vulnerabilities&#34;</span>]}
</span></span><span style="display:flex;"><span>    out <span style="color:#f92672">=</span> csv<span style="color:#f92672">.</span>writer(sys<span style="color:#f92672">.</span>stdout)
</span></span><span style="display:flex;"><span>    out<span style="color:#f92672">.</span>writerow([<span style="color:#e6db74">&#34;ghsa_id&#34;</span>, <span style="color:#e6db74">&#34;bucket&#34;</span>, <span style="color:#e6db74">&#34;severity&#34;</span>, <span style="color:#e6db74">&#34;ecosystem&#34;</span>, <span style="color:#e6db74">&#34;package&#34;</span>,
</span></span><span style="display:flex;"><span>                  <span style="color:#e6db74">&#34;published&#34;</span>, <span style="color:#e6db74">&#34;kev_cves_mentioned&#34;</span>, <span style="color:#e6db74">&#34;summary&#34;</span>])
</span></span><span style="display:flex;"><span>    counts <span style="color:#f92672">=</span> Counter()
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">for</span> path <span style="color:#f92672">in</span> glob<span style="color:#f92672">.</span>glob(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">{</span>db_dir<span style="color:#e6db74">}</span><span style="color:#e6db74">/advisories/github-reviewed/**/*.json&#34;</span>, recursive<span style="color:#f92672">=</span><span style="color:#66d9ef">True</span>):
</span></span><span style="display:flex;"><span>        adv <span style="color:#f92672">=</span> json<span style="color:#f92672">.</span>load(open(path))
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">if</span> adv<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;withdrawn&#34;</span>) <span style="color:#f92672">or</span> any(a<span style="color:#f92672">.</span>startswith(<span style="color:#e6db74">&#34;CVE-&#34;</span>) <span style="color:#66d9ef">for</span> a <span style="color:#f92672">in</span> adv<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;aliases&#34;</span>, [])):
</span></span><span style="display:flex;"><span>            <span style="color:#66d9ef">continue</span>
</span></span><span style="display:flex;"><span>        b, kev_cves <span style="color:#f92672">=</span> bucket(adv, kev)
</span></span><span style="display:flex;"><span>        counts[b] <span style="color:#f92672">+=</span> <span style="color:#ae81ff">1</span>
</span></span><span style="display:flex;"><span>        pkg <span style="color:#f92672">=</span> (adv<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;affected&#34;</span>) <span style="color:#f92672">or</span> [{}])[<span style="color:#ae81ff">0</span>]<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;package&#34;</span>, {})
</span></span><span style="display:flex;"><span>        out<span style="color:#f92672">.</span>writerow([adv[<span style="color:#e6db74">&#34;id&#34;</span>], b, adv[<span style="color:#e6db74">&#34;database_specific&#34;</span>]<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;severity&#34;</span>), pkg<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;ecosystem&#34;</span>),
</span></span><span style="display:flex;"><span>                      pkg<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;name&#34;</span>), adv[<span style="color:#e6db74">&#34;published&#34;</span>][:<span style="color:#ae81ff">10</span>], <span style="color:#e6db74">&#34; &#34;</span><span style="color:#f92672">.</span>join(kev_cves), adv<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;summary&#34;</span>, <span style="color:#e6db74">&#34;&#34;</span>)])
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">for</span> b, n <span style="color:#f92672">in</span> sorted(counts<span style="color:#f92672">.</span>items()):
</span></span><span style="display:flex;"><span>        print(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">{</span>b<span style="color:#e6db74">}</span><span style="color:#e6db74">: </span><span style="color:#e6db74">{</span>n<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>, file<span style="color:#f92672">=</span>sys<span style="color:#f92672">.</span>stderr)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> __name__ <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;__main__&#34;</span>:
</span></span><span style="display:flex;"><span>    main(<span style="color:#f92672">*</span>sys<span style="color:#f92672">.</span>argv[<span style="color:#ae81ff">1</span>:<span style="color:#ae81ff">3</span>])
</span></span></code></pre></div><p>Output on 3 December 2026:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>1-malware: remove package, rotate secrets: 358
</span></span><span style="display:flex;"><span>2-mentions a KEV CVE: check bundled component: 31
</span></span><span style="display:flex;"><span>3-critical/high, fix available: 1245
</span></span><span style="display:flex;"><span>4-critical/high, no fixed version: 227
</span></span><span style="display:flex;"><span>5-moderate/low: normal SLA: 1832
</span></span></code></pre></div><p>To get the inputs: <code>git clone --depth 1 --filter=blob:none --sparse https://github.com/github/advisory-database</code>, then <code>git sparse-checkout set advisories/github-reviewed</code>, and download the KEV JSON from cisagov/kev-data. To triage your own alerts rather than the whole database, filter the CSV to the GHSA IDs in your Dependabot or scanner export.</p>
<h2 id="common-mistakes">Common mistakes</h2>
<ul>
<li><strong>Reading &ldquo;no EPSS&rdquo; as &ldquo;EPSS 0&rdquo;.</strong> A missing score is missing data. A left join that fills nulls with 0 ranks every no-CVE advisory below everything that has a score.</li>
<li><strong>Sorting malware by fix availability.</strong> Malware advisories have no fix version by design. Route CWE-506 to incident response, not the patch queue.</li>
<li><strong>Joining only on <code>aliases</code>.</strong> It misses bundled-component advisories that name a KEV CVE in the text. Scan <code>details</code> and <code>references</code> as a second, lower-confidence pass.</li>
<li><strong>Trusting the severity word alone.</strong> 1,146 no-CVE advisories carry no CVSS vector, so there is nothing to recompute or adjust for your environment. Read the advisory.</li>
<li><strong>Assuming a CVE will arrive later.</strong> Some may, but we found nothing in the data that predicts which. Triage on what the record says today.</li>
</ul>
<h2 id="limits-of-this-article">Limits of this article</h2>
<ul>
<li>Counts come from one advisory-database commit, one KEV version and one EPSS day; all three change daily. Yesterday&rsquo;s GHSA vs CVE article reported 3,688 no-CVE advisories on 2 December.</li>
<li>We used a shallow clone, so we cannot say how many no-CVE advisories later gain a CVE alias.</li>
<li>&ldquo;Malware&rdquo; here means CWE-506 in a GitHub-reviewed advisory. We did not analyse the unreviewed set or GitHub&rsquo;s separate malware feed beyond what is in this repository.</li>
<li>The KEV-mention bucket is a text match. It shows that an advisory names a known-exploited CVE, not that the package is exploitable through it.</li>
<li>Ecosystem counts use the first <code>affected</code> package only.</li>
</ul>
<h2 id="sources-and-verification">Sources and verification</h2>
<table>
  <thead>
      <tr>
          <th>Important claim</th>
          <th>Source</th>
          <th>Status</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>GitHub is a CNA; maintainers can request a CVE from GitHub</td>
          <td><a href="https://docs.github.com/en/code-security/concepts/vulnerability-reporting-and-management/repository-security-advisories">GitHub Docs: Repository security advisories</a></td>
          <td>Verified (quoted)</td>
      </tr>
      <tr>
          <td>EPSS shown only for advisories containing CVEs; malware advisories are mostly substitution attacks; malware alerts carry no fix version</td>
          <td><a href="https://docs.github.com/en/code-security/concepts/vulnerability-reporting-and-management/github-advisory-database">GitHub Docs: GitHub Advisory Database</a></td>
          <td>Verified (quoted)</td>
      </tr>
      <tr>
          <td>Malware alerts are triggered only by GitHub-reviewed advisories</td>
          <td><a href="https://docs.github.com/en/code-security/concepts/supply-chain-security/malware-alerts">GitHub Docs: Dependabot malware alerts</a></td>
          <td>Verified (quoted)</td>
      </tr>
      <tr>
          <td><code>database_specific</code> fields (<code>severity</code>, <code>github_reviewed</code>, <code>cwe_ids</code>, <code>nvd_published_at</code>)</td>
          <td><a href="https://github.com/github/advisory-database">github/advisory-database README</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>KEV entries keyed by <code>cveID</code>; 1,810 entries</td>
          <td><a href="https://github.com/cisagov/kev-data">cisagov/kev-data</a> catalog 2026.11.30</td>
          <td>Verified (data)</td>
      </tr>
      <tr>
          <td>EPSS rows keyed by CVE ID; 416,792 rows</td>
          <td><a href="https://github.com/empiricalsec/epss_scores">empiricalsec/epss_scores</a> 2026-12-02 file</td>
          <td>Verified (data)</td>
      </tr>
      <tr>
          <td>All counts, buckets and example advisories</td>
          <td>Script run 3 December 2026 on advisory-database commit 85ddf6c</td>
          <td>Verified (computed)</td>
      </tr>
  </tbody>
</table>
]]></content:encoded></item><item><title>GHSA vs CVE: Join GitHub Advisories to KEV and EPSS</title><link>https://firewallsync.com/posts/ghsa-vs-cve-join-github-advisories-to-kev-and-epss/</link><guid>https://firewallsync.com/posts/ghsa-vs-cve-join-github-advisories-to-kev-and-epss/</guid><pubDate>Wed, 02 Dec 2026 04:40:00 +0000</pubDate><dc:creator>John Marshall</dc:creator><category>Security Operations</category><description>A GHSA ID is GitHub's advisory ID; a CVE ID is the CVE Program's. In 36,888 live GitHub-reviewed advisories, 33,200 carry exactly one CVE alias and 3,688 carry none. Joining on that alias puts 138 advisories in CISA KEV. Includes a tested join script.</description><enclosure url="https://firewallsync.com/posts/ghsa-vs-cve-join-github-advisories-to-kev-and-epss/cover_hu1595257831224399426.jpg" type="image/jpeg" length="0"/><media:content url="https://firewallsync.com/posts/ghsa-vs-cve-join-github-advisories-to-kev-and-epss/cover_hu1595257831224399426.jpg" medium="image" type="image/jpeg" width="1200" height="630"/><content:encoded><![CDATA[<p><img src="https://firewallsync.com/posts/ghsa-vs-cve-join-github-advisories-to-kev-and-epss/cover_hu1595257831224399426.jpg" alt="Close-up of interlocking grey steel chain links on a white background, with the far links out of focus" width="1200" height="630"></p><p><strong>Short answer:</strong> A <strong>GHSA ID</strong> is GitHub&rsquo;s identifier for an advisory in the GitHub Advisory Database. A <strong>CVE ID</strong> is the CVE Program&rsquo;s identifier for a vulnerability. In GitHub&rsquo;s <a href="https://ossf.github.io/osv-schema/">OSV</a> files, the CVE sits in the <code>aliases</code> array. CISA&rsquo;s KEV catalog and FIRST&rsquo;s EPSS scores are keyed only by CVE ID, so that alias is the only way to bring KEV and EPSS into a Dependabot-style workflow. On 2 December 2026, <strong>33,200 of 36,888</strong> live GitHub-reviewed advisories carried exactly one CVE alias, <strong>3,688</strong> carried none, and <strong>138</strong> matched KEV.</p>
<p>If your team triages dependency alerts by GitHub&rsquo;s severity label, this join changes the queue. Seven of the KEV-matched advisories are rated only <strong>Moderate</strong> by GitHub, and nine have EPSS scores below 0.1. This guide shows the fields, the numbers and a script that produces a GHSA → CVE → KEV → EPSS table you can sort. For the decision logic once you have the signals, use the <a href="/posts/vulnerability-prioritization-workflow-cve-record-to-patch-ticket/">vulnerability prioritization workflow from CVE record to patch ticket</a>.</p>
<h2 id="method">Method</h2>
<ul>
<li><strong>Advisories:</strong> <a href="https://github.com/github/advisory-database">github/advisory-database</a>, <code>advisories/github-reviewed/</code> at commit <code>11d8f435</code> (2 December 2026, 03:39 UTC). That&rsquo;s 38,182 OSV JSON files; 1,294 carry <code>withdrawn</code> and were excluded, leaving 36,888 live advisories.</li>
<li><strong>KEV:</strong> <code>known_exploited_vulnerabilities.json</code> from <a href="https://github.com/cisagov/kev-data">cisagov/kev-data</a>, catalogVersion <strong>2026.11.30</strong>, 1,810 entries.</li>
<li><strong>EPSS:</strong> <code>epss_scores-2026-12-01.csv.gz</code> from <a href="https://github.com/empiricalsec/epss_scores">empiricalsec/epss_scores</a>. The header reads <code>model_version:v2026.06.15,score_date:2026-12-01T12:00:22Z</code>.</li>
<li>All counts come from the script below, run on 2 December 2026.</li>
</ul>
<h2 id="the-identifiers">The identifiers</h2>
<table>
  <thead>
      <tr>
          <th></th>
          <th>GHSA ID</th>
          <th>CVE ID</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Issued by</td>
          <td>GitHub, for every advisory in its database</td>
          <td>A CVE Numbering Authority (CNA), under the CVE Program</td>
      </tr>
      <tr>
          <td>Format</td>
          <td><code>GHSA-xxxx-xxxx-xxxx</code>, characters from <code>23456789cfghjmpqrvwx</code></td>
          <td><code>CVE-YYYY-NNNN…</code></td>
      </tr>
      <tr>
          <td>Where in GitHub&rsquo;s OSV file</td>
          <td><code>id</code></td>
          <td><code>aliases[]</code></td>
      </tr>
      <tr>
          <td>Keys KEV and EPSS?</td>
          <td>No</td>
          <td>Yes</td>
      </tr>
      <tr>
          <td>Exists for every advisory?</td>
          <td>Yes</td>
          <td>No</td>
      </tr>
  </tbody>
</table>
<p>GitHub&rsquo;s README gives the validation regex <code>/GHSA(-[23456789cfghjmpqrvwx]{4}){3}/</code>. The OSV spec defines <code>aliases</code> as &ldquo;IDs of the same vulnerability in other databases&rdquo;, which should be &ldquo;symmetric&rdquo; and &ldquo;transitive&rdquo;. It also says aliases &ldquo;should <strong>not</strong> be used to refer to vulnerabilities in packages upstream or downstream in a software supply chain&rdquo;; the <code>upstream</code> field exists for that. None of the GitHub-reviewed files uses <code>upstream</code> or <code>related</code>, and none has a non-CVE alias. In practice, <code>aliases</code> in this data is either empty or one CVE ID.</p>
<h2 id="what-the-join-finds">What the join finds</h2>
<table>
  <thead>
      <tr>
          <th>Live GitHub-reviewed advisories (2 Dec 2026)</th>
          <th>Count</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Total</td>
          <td>36,888</td>
      </tr>
      <tr>
          <td>Exactly one CVE alias</td>
          <td>33,200</td>
      </tr>
      <tr>
          <td>No CVE alias</td>
          <td>3,688</td>
      </tr>
      <tr>
          <td>More than one CVE alias</td>
          <td>0</td>
      </tr>
      <tr>
          <td>CVE IDs mapped to more than one live GHSA</td>
          <td>0</td>
      </tr>
      <tr>
          <td>CVE present in the 2026-12-01 EPSS file</td>
          <td>33,001</td>
      </tr>
      <tr>
          <td>CVE missing from the EPSS file</td>
          <td>199</td>
      </tr>
      <tr>
          <td>CVE in KEV 2026.11.30</td>
          <td>138</td>
      </tr>
  </tbody>
</table>
<p>Advisories without a CVE, by the year folder they are filed under: 2026: 1,316; 2024: 657; 2020: 648; 2025: 333; 2022: 259; 2023: 223; 2021: 154; 2019: 93; 2018: 5. For these 3,688 advisories, KEV and EPSS give you nothing. Prioritize them on the advisory content and your own exposure.</p>
<p>One GHSA often covers several packages. GHSA-jpcq-cgw6-v4j6 (CVE-2020-11023) lists jQuery packages on npm, NuGet, Maven, Packagist and RubyGems. That is why the script emits one row per package: 138 KEV-matched advisories become 284 package rows.</p>
<h3 id="kev-matches-by-github-severity">KEV matches by GitHub severity</h3>
<p>GitHub assigns each advisory a severity in <code>database_specific.severity</code>. The 138 KEV matches break down as <strong>Critical 67, High 64, Moderate 7, Low 0</strong>. For comparison, across all 36,888 live advisories the split is Moderate 15,984, High 13,451, Critical 4,771 and Low 2,682.</p>
<p>The seven Moderate advisories that are in KEV:</p>
<table>
  <thead>
      <tr>
          <th>GHSA</th>
          <th>CVE</th>
          <th>Package (first listed)</th>
          <th>KEV dateAdded</th>
          <th>EPSS 2026-12-01</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>GHSA-qppj-fm5r-hxr3</td>
          <td>CVE-2023-44487</td>
          <td>github.com/apple/swift-nio-http2 (SwiftURL)</td>
          <td>2023-10-10</td>
          <td>0.99999</td>
      </tr>
      <tr>
          <td>GHSA-c2gp-86p4-5935</td>
          <td>CVE-2019-5786</td>
          <td>puppeteer (npm)</td>
          <td>2022-05-23</td>
          <td>0.61085</td>
      </tr>
      <tr>
          <td>GHSA-jpcq-cgw6-v4j6</td>
          <td>CVE-2020-11023</td>
          <td>jquery (npm)</td>
          <td>2025-01-23</td>
          <td>0.84887</td>
      </tr>
      <tr>
          <td>GHSA-pv36-h7jh-qm62</td>
          <td>CVE-2020-15999</td>
          <td>CefSharp.Common (NuGet)</td>
          <td>2021-11-03</td>
          <td>0.63894</td>
      </tr>
      <tr>
          <td>GHSA-86qp-5c8j-p5mr</td>
          <td>CVE-2026-48710</td>
          <td>starlette (PyPI)</td>
          <td>2026-09-02</td>
          <td>0.74037</td>
      </tr>
      <tr>
          <td>GHSA-4r4m-qw57-chr8</td>
          <td>CVE-2025-31125</td>
          <td>vite (npm)</td>
          <td>2026-01-22</td>
          <td>0.74939</td>
      </tr>
      <tr>
          <td>GHSA-7vrx-9684-xrf2</td>
          <td>CVE-2025-35939</td>
          <td>craftcms/cms (Packagist)</td>
          <td>2025-06-02</td>
          <td>0.03504</td>
      </tr>
  </tbody>
</table>
<p>GitHub&rsquo;s severity label describes the advisory. KEV records that CISA has evidence of exploitation. If your alert routing uses a &ldquo;High and above&rdquo; filter, these seven are known-exploited and never reach the queue.</p>
<h3 id="kev-matches-by-ecosystem">KEV matches by ecosystem</h3>
<p>Counting each advisory once per ecosystem it lists: Maven 54, Packagist 24, PyPI 23, NuGet 16, npm 15, Go 9, RubyGems 4, GitHub Actions 3, crates.io 1, SwiftURL 1.</p>
<h3 id="low-epss-but-in-kev">Low EPSS, but in KEV</h3>
<p>Nine KEV-matched advisories score below 0.1 in the 2026-12-01 EPSS file. Three of them are supply-chain compromises rather than bugs in code:</p>
<ul>
<li><strong>CVE-2025-54313</strong> (GHSA-f29h-pxvx-f335, EPSS 0.05125). KEV: &ldquo;Installing an affected package executes an install.js file that launches the node-gyp.dll malware on Windows.&rdquo; The GHSA lists eslint-config-prettier, eslint-plugin-prettier, synckit, @pkgr/core, napi-postinstall and got-fetch.</li>
<li><strong>CVE-2025-30154</strong> (GHSA-qmg3-hpqr-gqvc, EPSS 0.02485). KEV: reviewdog action-setup &ldquo;dumps exposed secrets to Github Actions Workflow Logs.&rdquo;</li>
<li><strong>CVE-2026-45321</strong> (GHSA-g7cv-rxg3-hmpx, EPSS 0.03278). KEV: malicious TanStack versions were published &ldquo;to the npm registry to publish credential-stealing malware under a trusted identity.&rdquo; The GHSA lists 42 <code>@tanstack/*</code> packages.</li>
</ul>
<p>The other six are CVE-2023-28434 (minio), CVE-2026-59822 (litellm), CVE-2025-35939 (craftcms/cms), CVE-2020-16017 and CVE-2020-16013 (CefSharp), and CVE-2023-22894 (@strapi/strapi). The rule from our <a href="/posts/cvss-vs-epss-vs-kev-which-signal-should-decide-what-you-patch-first/">CVSS vs EPSS vs KEV comparison</a> applies: a KEV listing is evidence of exploitation, and EPSS is a probability estimate, so KEV wins when they disagree.</p>
<p>Across all 33,001 GHSA-linked CVEs with a score, the median EPSS is 0.00669; 1,518 score at least 0.1 and 620 at least 0.5. The <a href="/posts/epss-data-feed-columns-percentile-vs-probability-and-how-to-join-it-to-a-scanner-export/">EPSS data feed guide</a> explains the probability and percentile columns.</p>
<h2 id="where-epss-lives-and-where-it-does-not">Where EPSS lives, and where it does not</h2>
<p>GitHub&rsquo;s documentation says &ldquo;The GitHub Advisory Database includes EPSS scores from FIRST for advisories containing CVEs with corresponding EPSS data.&rdquo; That is what the web view shows. The OSV files in github/advisory-database do not carry it. Across all 38,182 reviewed files, the only <code>database_specific</code> keys are <code>severity</code>, <code>cwe_ids</code>, <code>github_reviewed</code>, <code>github_reviewed_at</code> and <code>nvd_published_at</code>. There is no EPSS or KEV field. A pipeline built on the OSV files has to join EPSS and KEV itself, which is what the script does.</p>
<h2 id="the-join-script">The join script</h2>
<p>Python 3, standard library only. It reads the advisory tree, the KEV JSON and an EPSS daily CSV, skips withdrawn advisories and writes one CSV row per advisory and package. The <a href="/posts/cisa-kev-json-feed-what-each-field-means-and-how-to-match-it-against-a-scanner-export/">KEV JSON feed field guide</a> covers the KEV fields it reads.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#e6db74">&#34;&#34;&#34;Join GitHub-reviewed advisories (OSV JSON) to CISA KEV and FIRST EPSS via the aliases field.
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">Usage: python3 ghsa_kev_epss.py &lt;advisory-database&gt;/advisories/github-reviewed kev.json epss_scores-YYYY-MM-DD.csv.gz &gt; ghsa_priority.csv
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">Standard library only.
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> csv<span style="color:#f92672">,</span> glob<span style="color:#f92672">,</span> gzip<span style="color:#f92672">,</span> json<span style="color:#f92672">,</span> os<span style="color:#f92672">,</span> sys
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>adv_root, kev_path, epss_path <span style="color:#f92672">=</span> sys<span style="color:#f92672">.</span>argv[<span style="color:#ae81ff">1</span>:<span style="color:#ae81ff">4</span>]
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>kev <span style="color:#f92672">=</span> {v[<span style="color:#e6db74">&#34;cveID&#34;</span>]: v <span style="color:#66d9ef">for</span> v <span style="color:#f92672">in</span> json<span style="color:#f92672">.</span>load(open(kev_path))[<span style="color:#e6db74">&#34;vulnerabilities&#34;</span>]}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>epss <span style="color:#f92672">=</span> {}
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">with</span> gzip<span style="color:#f92672">.</span>open(epss_path, <span style="color:#e6db74">&#34;rt&#34;</span>) <span style="color:#66d9ef">as</span> f:
</span></span><span style="display:flex;"><span>    model_line <span style="color:#f92672">=</span> next(f)<span style="color:#f92672">.</span>strip()               <span style="color:#75715e"># &#34;#model_version:...,score_date:...&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">for</span> row <span style="color:#f92672">in</span> csv<span style="color:#f92672">.</span>DictReader(f):
</span></span><span style="display:flex;"><span>        epss[row[<span style="color:#e6db74">&#34;cve&#34;</span>]] <span style="color:#f92672">=</span> (row[<span style="color:#e6db74">&#34;epss&#34;</span>], row[<span style="color:#e6db74">&#34;percentile&#34;</span>])
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>out <span style="color:#f92672">=</span> csv<span style="color:#f92672">.</span>writer(sys<span style="color:#f92672">.</span>stdout)
</span></span><span style="display:flex;"><span>out<span style="color:#f92672">.</span>writerow([<span style="color:#e6db74">&#34;ghsa_id&#34;</span>, <span style="color:#e6db74">&#34;cve_id&#34;</span>, <span style="color:#e6db74">&#34;github_severity&#34;</span>, <span style="color:#e6db74">&#34;ecosystem&#34;</span>, <span style="color:#e6db74">&#34;package&#34;</span>,
</span></span><span style="display:flex;"><span>              <span style="color:#e6db74">&#34;in_kev&#34;</span>, <span style="color:#e6db74">&#34;kev_dateAdded&#34;</span>, <span style="color:#e6db74">&#34;kev_dueDate&#34;</span>, <span style="color:#e6db74">&#34;epss&#34;</span>, <span style="color:#e6db74">&#34;epss_percentile&#34;</span>, <span style="color:#e6db74">&#34;join_note&#34;</span>])
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">for</span> path <span style="color:#f92672">in</span> glob<span style="color:#f92672">.</span>glob(os<span style="color:#f92672">.</span>path<span style="color:#f92672">.</span>join(adv_root, <span style="color:#e6db74">&#34;**&#34;</span>, <span style="color:#e6db74">&#34;GHSA-*.json&#34;</span>), recursive<span style="color:#f92672">=</span><span style="color:#66d9ef">True</span>):
</span></span><span style="display:flex;"><span>    rec <span style="color:#f92672">=</span> json<span style="color:#f92672">.</span>load(open(path))
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> rec<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;withdrawn&#34;</span>):
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">continue</span>                                <span style="color:#75715e"># withdrawn: never alert on it</span>
</span></span><span style="display:flex;"><span>    cves <span style="color:#f92672">=</span> [a <span style="color:#66d9ef">for</span> a <span style="color:#f92672">in</span> rec<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;aliases&#34;</span>, []) <span style="color:#66d9ef">if</span> a<span style="color:#f92672">.</span>startswith(<span style="color:#e6db74">&#34;CVE-&#34;</span>)]
</span></span><span style="display:flex;"><span>    sev <span style="color:#f92672">=</span> rec<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;database_specific&#34;</span>, {})<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;severity&#34;</span>, <span style="color:#e6db74">&#34;&#34;</span>)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">for</span> pkg <span style="color:#f92672">in</span> {(a[<span style="color:#e6db74">&#34;package&#34;</span>][<span style="color:#e6db74">&#34;ecosystem&#34;</span>], a[<span style="color:#e6db74">&#34;package&#34;</span>][<span style="color:#e6db74">&#34;name&#34;</span>]) <span style="color:#66d9ef">for</span> a <span style="color:#f92672">in</span> rec<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;affected&#34;</span>, [])}:
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">if</span> <span style="color:#f92672">not</span> cves:
</span></span><span style="display:flex;"><span>            out<span style="color:#f92672">.</span>writerow([rec[<span style="color:#e6db74">&#34;id&#34;</span>], <span style="color:#e6db74">&#34;&#34;</span>, sev, <span style="color:#f92672">*</span>pkg, <span style="color:#e6db74">&#34;&#34;</span>, <span style="color:#e6db74">&#34;&#34;</span>, <span style="color:#e6db74">&#34;&#34;</span>, <span style="color:#e6db74">&#34;&#34;</span>, <span style="color:#e6db74">&#34;&#34;</span>, <span style="color:#e6db74">&#34;no CVE alias&#34;</span>])
</span></span><span style="display:flex;"><span>            <span style="color:#66d9ef">continue</span>
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">for</span> cve <span style="color:#f92672">in</span> cves:
</span></span><span style="display:flex;"><span>            k <span style="color:#f92672">=</span> kev<span style="color:#f92672">.</span>get(cve)
</span></span><span style="display:flex;"><span>            e <span style="color:#f92672">=</span> epss<span style="color:#f92672">.</span>get(cve, (<span style="color:#e6db74">&#34;&#34;</span>, <span style="color:#e6db74">&#34;&#34;</span>))
</span></span><span style="display:flex;"><span>            note <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;&#34;</span> <span style="color:#66d9ef">if</span> cve <span style="color:#f92672">in</span> epss <span style="color:#66d9ef">else</span> <span style="color:#e6db74">&#34;CVE not in EPSS file&#34;</span>
</span></span><span style="display:flex;"><span>            out<span style="color:#f92672">.</span>writerow([rec[<span style="color:#e6db74">&#34;id&#34;</span>], cve, sev, <span style="color:#f92672">*</span>pkg, <span style="color:#e6db74">&#34;yes&#34;</span> <span style="color:#66d9ef">if</span> k <span style="color:#66d9ef">else</span> <span style="color:#e6db74">&#34;no&#34;</span>,
</span></span><span style="display:flex;"><span>                          k[<span style="color:#e6db74">&#34;dateAdded&#34;</span>] <span style="color:#66d9ef">if</span> k <span style="color:#66d9ef">else</span> <span style="color:#e6db74">&#34;&#34;</span>, k[<span style="color:#e6db74">&#34;dueDate&#34;</span>] <span style="color:#66d9ef">if</span> k <span style="color:#66d9ef">else</span> <span style="color:#e6db74">&#34;&#34;</span>, <span style="color:#f92672">*</span>e, note])
</span></span><span style="display:flex;"><span>print(model_line, file<span style="color:#f92672">=</span>sys<span style="color:#f92672">.</span>stderr)
</span></span></code></pre></div><p>On the inputs above it wrote 47,559 data rows covering 36,888 advisories: 284 rows with <code>in_kev = yes</code> (138 advisories) and 5,133 rows flagged <code>no CVE alias</code>. To get the files: a sparse clone of <code>advisories/github-reviewed</code> from github/advisory-database, the KEV JSON from cisagov/kev-data, and the latest daily file from the EPSS scores repository.</p>
<p>To use it against your own alerts, filter the output to the <code>(ecosystem, package)</code> pairs in your lockfiles or SBOM. Then sort by <code>in_kev</code>, then <code>epss</code>, and only then GitHub severity. Whether your installed version is actually inside the affected range is a separate check, covered in our <a href="/posts/osv-schema-ranges-introduced-fixed-last-affected-ghsa/">OSV schema ranges guide</a>.</p>
<h2 id="common-mistakes">Common mistakes</h2>
<ul>
<li><strong>Treating &ldquo;no CVE&rdquo; as &ldquo;low risk&rdquo;.</strong> 3,688 live advisories have no CVE, so they will never appear in KEV or EPSS. Absence of a signal is not a signal.</li>
<li><strong>Filtering on GitHub severity before the KEV join.</strong> It drops the seven Moderate KEV entries above.</li>
<li><strong>Counting KEV hits per package row.</strong> One advisory can expand to dozens of package rows, as with 42 TanStack packages. Deduplicate on GHSA or CVE for reporting.</li>
<li><strong>Keeping withdrawn advisories.</strong> 1,294 reviewed files carry <code>withdrawn</code>; they should not generate tickets.</li>
<li><strong>Assuming the alias list is stable.</strong> CVEs are sometimes assigned after the GHSA is published, so re-run the join on fresh data rather than caching it.</li>
</ul>
<h2 id="limits-of-this-article">Limits of this article</h2>
<ul>
<li>Counts are from one advisory-database commit, one KEV version and one EPSS day; all three change daily.</li>
<li>We did not analyse unreviewed or malware advisories; per GitHub&rsquo;s docs, Dependabot alerts come from reviewed advisories.</li>
<li>We did not test the Dependabot alerts REST API or its fields; the join here is from the published OSV files.</li>
<li>A KEV match shows that the CVE is known-exploited, not that it is exploited through every package listed in the GHSA.</li>
</ul>
<h2 id="sources-and-verification">Sources and verification</h2>
<table>
  <thead>
      <tr>
          <th>Important claim</th>
          <th>Source</th>
          <th>Status</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>GHSA ID format and regex; <code>database_specific</code> fields and meaning</td>
          <td><a href="https://github.com/github/advisory-database">github/advisory-database README</a></td>
          <td>Verified (verbatim)</td>
      </tr>
      <tr>
          <td><code>aliases</code>, <code>upstream</code> and <code>related</code> definitions</td>
          <td><a href="https://github.com/ossf/osv-schema/blob/main/docs/schema.md">OSV schema docs/schema.md</a></td>
          <td>Verified (verbatim)</td>
      </tr>
      <tr>
          <td>GitHub-reviewed advisories; OSV format; EPSS from FIRST shown in the database</td>
          <td><a href="https://docs.github.com/en/enterprise-cloud@latest/code-security/concepts/vulnerability-reporting-and-management/github-advisory-database">GitHub Docs: GitHub Advisory Database</a></td>
          <td>Verified (quoted)</td>
      </tr>
      <tr>
          <td>KEV entries, dateAdded and shortDescription text</td>
          <td><a href="https://github.com/cisagov/kev-data">cisagov/kev-data</a> catalog 2026.11.30</td>
          <td>Verified (data)</td>
      </tr>
      <tr>
          <td>EPSS scores and model version</td>
          <td><a href="https://github.com/empiricalsec/epss_scores">empiricalsec/epss_scores</a> 2026-12-01 file</td>
          <td>Verified (data)</td>
      </tr>
      <tr>
          <td>All counts and tables</td>
          <td>Script run 2 December 2026 on advisory-database commit 11d8f435</td>
          <td>Verified (computed)</td>
      </tr>
  </tbody>
</table>
]]></content:encoded></item><item><title>OSV Schema Ranges: introduced, fixed and last_affected</title><link>https://firewallsync.com/posts/osv-schema-ranges-introduced-fixed-last-affected-ghsa/</link><guid>https://firewallsync.com/posts/osv-schema-ranges-introduced-fixed-last-affected-ghsa/</guid><pubDate>Wed, 02 Dec 2026 04:30:00 +0000</pubDate><dc:creator>Craig Leslie</dc:creator><category>AppSec &amp; APIs</category><description>How OSV affected ranges work: introduced, fixed, last_affected and limit events, the IsVulnerable algorithm, and what 12,240 live 2026 GitHub-reviewed advisories actually use. Includes a tested Python evaluator for PyPI and npm.</description><enclosure url="https://firewallsync.com/posts/osv-schema-ranges-introduced-fixed-last-affected-ghsa/cover_hu13982152058533144389.jpg" type="image/jpeg" length="0"/><media:content url="https://firewallsync.com/posts/osv-schema-ranges-introduced-fixed-last-affected-ghsa/cover_hu13982152058533144389.jpg" medium="image" type="image/jpeg" width="1200" height="630"/><content:encoded><![CDATA[<p><img src="https://firewallsync.com/posts/osv-schema-ranges-introduced-fixed-last-affected-ghsa/cover_hu13982152058533144389.jpg" alt="A yellow tape measure, a translucent meter tape and a steel ruler laid side by side on a white surface, each with different markings" width="1200" height="630"></p><p><strong>Short answer:</strong> In an <a href="https://ossf.github.io/osv-schema/">OSV</a> record, each <code>affected[].ranges[]</code> entry is a timeline of events. A version is affected from an <code>introduced</code> event until a <code>fixed</code> event, where the fixed version is <strong>not</strong> affected. If the range uses <code>last_affected</code> instead, that version <strong>is</strong> affected and anything above it is assumed safe. <code>&quot;introduced&quot;: &quot;0&quot;</code> means &ldquo;from the first version&rdquo;. In the GitHub Advisory Database, every range is type <code>ECOSYSTEM</code> and has exactly one <code>introduced</code> event. That means your matcher needs a real per-ecosystem version comparator, not string comparison.</p>
<p>OSV is the format behind osv.dev, the GitHub Advisory Database (GHSA), the Go vulnerability database, PyPA&rsquo;s advisories and many Linux distributions. If you build or maintain anything that answers &ldquo;is <code>jupyterlab 4.6.3</code> affected?&rdquo;, these few fields decide whether your answer is right. That includes a dependency scanner, an SBOM matcher or a script that turns Dependabot data into tickets. This guide covers the spec rules, what real GitHub records look like, and a tested evaluator. It complements the <a href="/posts/cve-affected-versions-lessthan-defaultstatus-versiontype/">CVE JSON 5 affected-versions guide</a>, which covers the equivalent fields in CVE records.</p>
<h2 id="method">Method</h2>
<ul>
<li><strong>Spec:</strong> <code>docs/schema.md</code> from <a href="https://github.com/ossf/osv-schema/blob/main/docs/schema.md">ossf/osv-schema</a>, fetched 2 December 2026. Its header reads &ldquo;Version 1.9.3 (November 30, 2026)&rdquo;.</li>
<li><strong>Data:</strong> <a href="https://github.com/github/advisory-database">github/advisory-database</a>, <code>advisories/github-reviewed/2026/</code> at commit <code>11d8f435</code> (2 December 2026, 03:39 UTC). These are the GitHub-reviewed advisories filed under 2026: 12,918 JSON files, of which 678 carry <code>withdrawn</code>, leaving <strong>12,240 live</strong> records.</li>
<li><strong>Counts</strong> come from a Python script that reads every file. Counts of &ldquo;ranges&rdquo; and &ldquo;affected entries&rdquo; are the same here, because every GitHub <code>affected</code> entry in this set has at most one range.</li>
</ul>
<h2 id="the-fields">The fields</h2>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#e6db74">&#34;affected&#34;</span><span style="color:#960050;background-color:#1e0010">:</span> [ {
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;package&#34;</span>:  { <span style="color:#f92672">&#34;ecosystem&#34;</span>: <span style="color:#e6db74">&#34;PyPI&#34;</span>, <span style="color:#f92672">&#34;name&#34;</span>: <span style="color:#e6db74">&#34;jupyterlab&#34;</span>, <span style="color:#f92672">&#34;purl&#34;</span>: <span style="color:#e6db74">&#34;...&#34;</span> },
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;ranges&#34;</span>:   [ { <span style="color:#f92672">&#34;type&#34;</span>: <span style="color:#e6db74">&#34;ECOSYSTEM&#34;</span>, <span style="color:#f92672">&#34;events&#34;</span>: [ {<span style="color:#f92672">&#34;introduced&#34;</span>: <span style="color:#e6db74">&#34;4.0.0&#34;</span>}, {<span style="color:#f92672">&#34;fixed&#34;</span>: <span style="color:#e6db74">&#34;4.5.11&#34;</span>} ] } ],
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;versions&#34;</span>: [ <span style="color:#e6db74">&#34;...&#34;</span> ],
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;database_specific&#34;</span>: { }
</span></span><span style="display:flex;"><span>} ]
</span></span></code></pre></div><table>
  <thead>
      <tr>
          <th>Field</th>
          <th>What the spec says</th>
          <th>What it means for a matcher</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>package.ecosystem</code> + <code>name</code></td>
          <td>Identifies the package</td>
          <td>Match on both. Never match on name alone.</td>
      </tr>
      <tr>
          <td><code>ranges[].type</code></td>
          <td><code>SEMVER</code>, <code>ECOSYSTEM</code> or <code>GIT</code></td>
          <td>Picks the comparator. <code>GIT</code> needs the commit graph.</td>
      </tr>
      <tr>
          <td><code>introduced</code></td>
          <td>Start of a vulnerable stretch; <code>&quot;0&quot;</code> sorts before every version</td>
          <td>At least one is required per range</td>
      </tr>
      <tr>
          <td><code>fixed</code></td>
          <td>First version that contains the fix</td>
          <td>The fixed version is <strong>not</strong> affected</td>
      </tr>
      <tr>
          <td><code>last_affected</code></td>
          <td>&ldquo;the hard ceiling of the vulnerability <em>at the time of publication</em>&rdquo;</td>
          <td>That version <strong>is</strong> affected; versions above are assumed unaffected</td>
      </tr>
      <tr>
          <td><code>limit</code></td>
          <td>Upper limit; <code>&quot;*&quot;</code> means infinity, and an implicit <code>&quot;*&quot;</code> applies if absent</td>
          <td>Mostly relevant to <code>GIT</code> ranges</td>
      </tr>
      <tr>
          <td><code>versions[]</code></td>
          <td>Explicit list of affected versions</td>
          <td>A version is affected if it is in this list <strong>or</strong> inside any range</td>
      </tr>
  </tbody>
</table>
<p>Three rules from the spec trip up hand-written parsers:</p>
<ol>
<li><strong>One key per event.</strong> &ldquo;Only <strong>a single type</strong> (either <code>introduced</code>, <code>fixed</code>, <code>last_affected</code>, <code>limit</code>) is allowed in each event object.&rdquo; So <code>{&quot;introduced&quot;: &quot;1.0.0&quot;, &quot;fixed&quot;: &quot;1.0.2&quot;}</code> is invalid; it must be two objects.</li>
<li><strong><code>fixed</code> or <code>last_affected</code>, not both.</strong> &ldquo;Entries in the <code>events</code> array may be &ldquo;last_affected&rdquo; or &ldquo;fixed&rdquo; events, but not both.&rdquo; The spec adds that it is &ldquo;<strong>strongly recommended</strong> to use <code>fixed</code> instead of <code>last_affected</code> where possible.&rdquo;</li>
<li><strong>ECOSYSTEM strings are not SemVer.</strong> They are &ldquo;arbitrary, uninterpreted strings specific to the package ecosystem&rdquo;. For these ranges the spec recommends also supplying an explicit <code>versions</code> list, &ldquo;because <code>ECOSYSTEM</code> range inclusion queries may not be able to be answered without reference to the package ecosystem&rsquo;s own logic&rdquo;.</li>
</ol>
<h2 id="how-evaluation-works">How evaluation works</h2>
<p>The spec gives <code>IsVulnerable</code> as pseudocode. Per range, it sorts the events by version and walks them: <code>introduced</code> at or below <code>v</code> sets vulnerable, <code>fixed</code> at or below <code>v</code> clears it, and a <code>last_affected</code> strictly below <code>v</code> clears it. A version is affected if any range says so or if it is listed in <code>versions</code>.</p>
<table>
  <thead>
      <tr>
          <th>Range</th>
          <th><code>1.0.1</code></th>
          <th><code>1.0.2</code></th>
          <th><code>2.1.214</code></th>
          <th><code>2.1.215</code></th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>introduced 0</code>, <code>fixed 1.0.2</code></td>
          <td>affected</td>
          <td>not affected</td>
          <td>not affected</td>
          <td>not affected</td>
      </tr>
      <tr>
          <td><code>introduced 0</code>, <code>last_affected 2.1.214</code></td>
          <td>affected</td>
          <td>affected</td>
          <td><strong>affected</strong></td>
          <td>not affected</td>
      </tr>
      <tr>
          <td><code>introduced 0</code> (no closing event)</td>
          <td>affected</td>
          <td>affected</td>
          <td>affected</td>
          <td>affected</td>
      </tr>
  </tbody>
</table>
<p>The middle row is the false-negative risk the spec warns about. <code>last_affected</code> records what was known at publication. If the maintainers never ship a fix, every later version still matches as &ldquo;not affected&rdquo;.</p>
<h2 id="what-githubs-2026-records-actually-use">What GitHub&rsquo;s 2026 records actually use</h2>
<table>
  <thead>
      <tr>
          <th>Measure (live 2026 GitHub-reviewed records)</th>
          <th>Count</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Records</td>
          <td>12,240</td>
      </tr>
      <tr>
          <td><code>affected</code> entries</td>
          <td>23,877</td>
      </tr>
      <tr>
          <td>Entries with a range</td>
          <td>23,747</td>
      </tr>
      <tr>
          <td>Entries with only a <code>versions</code> list</td>
          <td>130</td>
      </tr>
      <tr>
          <td>Ranges ending in <code>fixed</code></td>
          <td>22,028</td>
      </tr>
      <tr>
          <td>Ranges ending in <code>last_affected</code></td>
          <td>1,603</td>
      </tr>
      <tr>
          <td>Ranges with only <code>introduced</code></td>
          <td>116</td>
      </tr>
      <tr>
          <td>Ranges with more than one <code>introduced</code></td>
          <td>0</td>
      </tr>
      <tr>
          <td>Ranges with a <code>limit</code> event</td>
          <td>0</td>
      </tr>
  </tbody>
</table>
<p>Across all 12,918 files, including withdrawn ones, every one of the 24,464 ranges is <code>&quot;type&quot;: &quot;ECOSYSTEM&quot;</code>. That holds even for npm and Go, which use SemVer-style versions. Every file declares <code>&quot;schema_version&quot;: &quot;1.4.0&quot;</code>, while the spec text is now at 1.9.3.</p>
<p>Ecosystems by <code>affected</code> entries (all 12,918 files): npm 5,721, NuGet 5,143, Go 3,415, PyPI 3,142, Maven 2,832, Packagist 2,643, crates.io 1,131, RubyGems 421, Hex 103, GitHub Actions 28, SwiftURL 25, Pub 2.</p>
<p>Practical consequences:</p>
<ul>
<li><strong>Multiple vulnerable branches show up as separate <code>affected</code> entries for the same package,</strong> each with its own range. They are not one range with several <code>introduced</code> events. <a href="https://github.com/advisories/GHSA-3325-v43h-43rv">GHSA-3325-v43h-43rv</a> (JupyterLab, CVE-2026-102904) has two <code>jupyterlab</code> entries: <code>introduced 4.0.0 → fixed 4.5.11</code> and <code>introduced 4.6.0 → fixed 4.6.4</code>. A matcher that stops at the first entry for a package misses the second branch.</li>
<li><strong>Mixed <code>fixed</code> and <code>last_affected</code> in one advisory is normal.</strong> <a href="https://github.com/advisories/GHSA-62vg-58rm-qff7">GHSA-62vg-58rm-qff7</a> (<code>@angular/router</code>, CVE-2026-111752) has four entries. Three branches have fixed versions (22.2.1, 21.2.25, 20.3.33). The oldest is <code>introduced 0 → last_affected 19.2.25</code>, so any 19.x above 19.2.25 evaluates as not affected, whether or not it contains a fix.</li>
</ul>
<h2 id="the-database_specific-trap">The database_specific trap</h2>
<p>GitHub adds a range-level <code>database_specific.last_known_affected_version_range</code> string, such as <code>&quot;&lt;= 16.3.0&quot;</code>. The advisory-database README describes it as range information &ldquo;that is not representable in OSV format&rdquo;, and says that GitHub&rsquo;s <code>database_specific</code> values &ldquo;are subject to change without notice. Consuming systems should not rely on them for processing vulnerability information.&rdquo;</p>
<p>The string is not always redundant with the OSV range:</p>
<table>
  <thead>
      <tr>
          <th>Live 2026 ranges</th>
          <th>Count</th>
          <th>Example</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>fixed</code> event + <code>&quot;&lt;= X&quot;</code> string</td>
          <td>6,526</td>
          <td>mercurius: <code>fixed 16.4.0</code>, string <code>&lt;= 16.3.0</code></td>
      </tr>
      <tr>
          <td><code>fixed</code> event + <code>&quot;&lt; X&quot;</code> string</td>
          <td>101</td>
          <td>netty-codec-http2 (CVE-2026-33871): <code>fixed 4.2.11.Final</code>, string <code>&lt; 4.2.10.Final</code></td>
      </tr>
      <tr>
          <td>only <code>introduced</code> + <code>&quot;&lt; X&quot;</code> string</td>
          <td>79</td>
          <td>frigate (CVE-2026-33125): range <code>introduced 0</code>, string <code>&lt; 0.16.3</code></td>
      </tr>
  </tbody>
</table>
<p>In the last row, the OSV range has no closing event, so any OSV-native evaluator treats every version as affected, including the one the string implies is safe. Of the 79, 49 are Go modules, 10 Maven, 9 npm, 7 Packagist, 3 PyPI and 1 crates.io. Our evaluator below reports <code>frigate 0.16.3</code> as affected, which is what the OSV data says. Following GitHub&rsquo;s guidance, the safe reading is to trust the range and treat the string only as a hint for manual review. Resolving the disagreement means checking the vendor advisory.</p>
<p>Withdrawn records are the other trap. Of the 678 withdrawn 2026 files, 659 have summaries beginning &ldquo;Duplicate Advisory&rdquo;. In 210 of their ranges, there is only an <code>introduced</code> event. A matcher that ignores <code>withdrawn</code> will raise &ldquo;all versions affected&rdquo; alerts for advisories GitHub has retracted.</p>
<h2 id="a-tested-evaluator">A tested evaluator</h2>
<p>This is a port of the spec&rsquo;s <code>IsVulnerable</code> pseudocode to Python 3. It supports PyPI (PEP 440, via <code>packaging</code> 26.3) and npm (SemVer 2.0 precedence). It refuses other ecosystems and <code>GIT</code> ranges rather than guessing. Treat it as a reference implementation for tests, not a production scanner: Maven, NuGet, Go pseudo-versions and Debian need their own comparators.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#e6db74">&#34;&#34;&#34;Evaluate whether a package version is affected by an OSV record.
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">Port of the IsVulnerable pseudocode in the OSV schema (ossf/osv-schema docs/schema.md).
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">Usage: python3 osv_affected.py &lt;osv.json&gt; &lt;ecosystem&gt; &lt;package&gt; &lt;version&gt;
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> json<span style="color:#f92672">,</span> re<span style="color:#f92672">,</span> sys
</span></span><span style="display:flex;"><span><span style="color:#f92672">from</span> functools <span style="color:#f92672">import</span> cmp_to_key
</span></span><span style="display:flex;"><span><span style="color:#f92672">from</span> packaging.version <span style="color:#f92672">import</span> Version
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>SEMVER <span style="color:#f92672">=</span> re<span style="color:#f92672">.</span>compile(<span style="color:#e6db74">r</span><span style="color:#e6db74">&#34;^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$&#34;</span>)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">semver_key</span>(v):
</span></span><span style="display:flex;"><span>    m <span style="color:#f92672">=</span> SEMVER<span style="color:#f92672">.</span><span style="color:#66d9ef">match</span>(v)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> <span style="color:#f92672">not</span> m:
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">raise</span> <span style="color:#a6e22e">ValueError</span>(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;not SemVer: </span><span style="color:#e6db74">{</span>v<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>)
</span></span><span style="display:flex;"><span>    core <span style="color:#f92672">=</span> tuple(int(x) <span style="color:#66d9ef">for</span> x <span style="color:#f92672">in</span> m<span style="color:#f92672">.</span>group(<span style="color:#ae81ff">1</span>, <span style="color:#ae81ff">2</span>, <span style="color:#ae81ff">3</span>))
</span></span><span style="display:flex;"><span>    pre <span style="color:#f92672">=</span> m<span style="color:#f92672">.</span>group(<span style="color:#ae81ff">4</span>)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> pre <span style="color:#f92672">is</span> <span style="color:#66d9ef">None</span>:
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> core, (<span style="color:#ae81ff">1</span>,)            <span style="color:#75715e"># a release sorts after its prereleases</span>
</span></span><span style="display:flex;"><span>    ids <span style="color:#f92672">=</span> tuple((<span style="color:#ae81ff">0</span>, int(p), <span style="color:#e6db74">&#34;&#34;</span>) <span style="color:#66d9ef">if</span> p<span style="color:#f92672">.</span>isdigit() <span style="color:#66d9ef">else</span> (<span style="color:#ae81ff">1</span>, <span style="color:#ae81ff">0</span>, p) <span style="color:#66d9ef">for</span> p <span style="color:#f92672">in</span> pre<span style="color:#f92672">.</span>split(<span style="color:#e6db74">&#34;.&#34;</span>))
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> core, (<span style="color:#ae81ff">0</span>,) <span style="color:#f92672">+</span> ids
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">compare</span>(eco, a, b):
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> a <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;0&#34;</span>:                      <span style="color:#75715e"># OSV special value: sorts before everything</span>
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> <span style="color:#ae81ff">0</span> <span style="color:#66d9ef">if</span> b <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;0&#34;</span> <span style="color:#66d9ef">else</span> <span style="color:#f92672">-</span><span style="color:#ae81ff">1</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> b <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;0&#34;</span>:
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> <span style="color:#ae81ff">1</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> eco <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;PyPI&#34;</span>:
</span></span><span style="display:flex;"><span>        ka, kb <span style="color:#f92672">=</span> Version(a), Version(b)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">elif</span> eco <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;npm&#34;</span>:
</span></span><span style="display:flex;"><span>        ka, kb <span style="color:#f92672">=</span> semver_key(a), semver_key(b)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">else</span>:
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">raise</span> <span style="color:#a6e22e">NotImplementedError</span>(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;no comparator for </span><span style="color:#e6db74">{</span>eco<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> (ka <span style="color:#f92672">&gt;</span> kb) <span style="color:#f92672">-</span> (ka <span style="color:#f92672">&lt;</span> kb)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">event_value</span>(evt):
</span></span><span style="display:flex;"><span>    (k, v), <span style="color:#f92672">=</span> evt<span style="color:#f92672">.</span>items()            <span style="color:#75715e"># the spec allows exactly one key per event</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> k, v
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">included_in_range</span>(eco, v, rng):
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> rng[<span style="color:#e6db74">&#34;type&#34;</span>] <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;GIT&#34;</span>:
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">raise</span> <span style="color:#a6e22e">NotImplementedError</span>(<span style="color:#e6db74">&#34;GIT ranges need the commit graph&#34;</span>)
</span></span><span style="display:flex;"><span>    events <span style="color:#f92672">=</span> [event_value(e) <span style="color:#66d9ef">for</span> e <span style="color:#f92672">in</span> rng[<span style="color:#e6db74">&#34;events&#34;</span>]]
</span></span><span style="display:flex;"><span>    limits <span style="color:#f92672">=</span> [val <span style="color:#66d9ef">for</span> k, val <span style="color:#f92672">in</span> events <span style="color:#66d9ef">if</span> k <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;limit&#34;</span>]
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> limits <span style="color:#f92672">and</span> <span style="color:#f92672">not</span> any(<span style="color:#e6db74">&#34;*&#34;</span> <span style="color:#f92672">in</span> l <span style="color:#f92672">or</span> compare(eco, v, l) <span style="color:#f92672">&lt;</span> <span style="color:#ae81ff">0</span> <span style="color:#66d9ef">for</span> l <span style="color:#f92672">in</span> limits):
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">False</span>                 <span style="color:#75715e"># BeforeLimits(): no limit means an implicit &#34;*&#34;</span>
</span></span><span style="display:flex;"><span>    ordered <span style="color:#f92672">=</span> sorted((e <span style="color:#66d9ef">for</span> e <span style="color:#f92672">in</span> events <span style="color:#66d9ef">if</span> e[<span style="color:#ae81ff">0</span>] <span style="color:#f92672">!=</span> <span style="color:#e6db74">&#34;limit&#34;</span>),
</span></span><span style="display:flex;"><span>                     key<span style="color:#f92672">=</span>cmp_to_key(<span style="color:#66d9ef">lambda</span> x, y: compare(eco, x[<span style="color:#ae81ff">1</span>], y[<span style="color:#ae81ff">1</span>])))
</span></span><span style="display:flex;"><span>    vulnerable <span style="color:#f92672">=</span> <span style="color:#66d9ef">False</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">for</span> k, val <span style="color:#f92672">in</span> ordered:
</span></span><span style="display:flex;"><span>        c <span style="color:#f92672">=</span> compare(eco, v, val)
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">if</span> k <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;introduced&#34;</span> <span style="color:#f92672">and</span> c <span style="color:#f92672">&gt;=</span> <span style="color:#ae81ff">0</span>:
</span></span><span style="display:flex;"><span>            vulnerable <span style="color:#f92672">=</span> <span style="color:#66d9ef">True</span>
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">elif</span> k <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;fixed&#34;</span> <span style="color:#f92672">and</span> c <span style="color:#f92672">&gt;=</span> <span style="color:#ae81ff">0</span>:
</span></span><span style="display:flex;"><span>            vulnerable <span style="color:#f92672">=</span> <span style="color:#66d9ef">False</span>
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">elif</span> k <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;last_affected&#34;</span> <span style="color:#f92672">and</span> c <span style="color:#f92672">&gt;</span> <span style="color:#ae81ff">0</span>:
</span></span><span style="display:flex;"><span>            vulnerable <span style="color:#f92672">=</span> <span style="color:#66d9ef">False</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> vulnerable
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">is_affected</span>(osv, eco, name, v):
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> osv<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;withdrawn&#34;</span>):
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">False</span>, <span style="color:#e6db74">&#34;record withdrawn &#34;</span> <span style="color:#f92672">+</span> osv[<span style="color:#e6db74">&#34;withdrawn&#34;</span>]
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">for</span> a <span style="color:#f92672">in</span> osv<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;affected&#34;</span>, []):
</span></span><span style="display:flex;"><span>        p <span style="color:#f92672">=</span> a[<span style="color:#e6db74">&#34;package&#34;</span>]
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">if</span> p[<span style="color:#e6db74">&#34;ecosystem&#34;</span>] <span style="color:#f92672">!=</span> eco <span style="color:#f92672">or</span> p[<span style="color:#e6db74">&#34;name&#34;</span>] <span style="color:#f92672">!=</span> name:
</span></span><span style="display:flex;"><span>            <span style="color:#66d9ef">continue</span>
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">if</span> v <span style="color:#f92672">in</span> a<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;versions&#34;</span>, []):
</span></span><span style="display:flex;"><span>            <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">True</span>, <span style="color:#e6db74">&#34;listed in versions[]&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">for</span> r <span style="color:#f92672">in</span> a<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;ranges&#34;</span>, []):
</span></span><span style="display:flex;"><span>            <span style="color:#66d9ef">if</span> included_in_range(eco, v, r):
</span></span><span style="display:flex;"><span>                <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">True</span>, <span style="color:#e6db74">&#34;inside range &#34;</span> <span style="color:#f92672">+</span> json<span style="color:#f92672">.</span>dumps(r[<span style="color:#e6db74">&#34;events&#34;</span>])
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">False</span>, <span style="color:#e6db74">&#34;not inside any range or versions[]&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> __name__ <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;__main__&#34;</span>:
</span></span><span style="display:flex;"><span>    path, eco, name, ver <span style="color:#f92672">=</span> sys<span style="color:#f92672">.</span>argv[<span style="color:#ae81ff">1</span>:<span style="color:#ae81ff">5</span>]
</span></span><span style="display:flex;"><span>    osv <span style="color:#f92672">=</span> json<span style="color:#f92672">.</span>load(open(path))
</span></span><span style="display:flex;"><span>    hit, why <span style="color:#f92672">=</span> is_affected(osv, eco, name, ver)
</span></span><span style="display:flex;"><span>    print(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">{</span>osv[<span style="color:#e6db74">&#39;id&#39;</span>]<span style="color:#e6db74">}</span><span style="color:#e6db74"> </span><span style="color:#e6db74">{</span>name<span style="color:#e6db74">}</span><span style="color:#e6db74">@</span><span style="color:#e6db74">{</span>ver<span style="color:#e6db74">}</span><span style="color:#e6db74">: </span><span style="color:#e6db74">{</span><span style="color:#e6db74">&#39;AFFECTED&#39;</span> <span style="color:#66d9ef">if</span> hit <span style="color:#66d9ef">else</span> <span style="color:#e6db74">&#39;not affected&#39;</span><span style="color:#e6db74">}</span><span style="color:#e6db74"> (</span><span style="color:#e6db74">{</span>why<span style="color:#e6db74">}</span><span style="color:#e6db74">)&#34;</span>)
</span></span></code></pre></div><p>We ran it on 2 December 2026 against the advisory-database files named above:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>GHSA-3325-v43h-43rv jupyterlab@4.5.10: AFFECTED (inside range [{&#34;introduced&#34;: &#34;4.0.0&#34;}, {&#34;fixed&#34;: &#34;4.5.11&#34;}])
</span></span><span style="display:flex;"><span>GHSA-3325-v43h-43rv jupyterlab@4.5.11: not affected (not inside any range or versions[])
</span></span><span style="display:flex;"><span>GHSA-3325-v43h-43rv jupyterlab@4.6.0: AFFECTED (inside range [{&#34;introduced&#34;: &#34;4.6.0&#34;}, {&#34;fixed&#34;: &#34;4.6.4&#34;}])
</span></span><span style="display:flex;"><span>GHSA-3325-v43h-43rv jupyterlab@4.6.4: not affected (not inside any range or versions[])
</span></span><span style="display:flex;"><span>GHSA-3325-v43h-43rv jupyterlab@4.6.0rc1: not affected (not inside any range or versions[])
</span></span><span style="display:flex;"><span>GHSA-62vg-58rm-qff7 @angular/router@19.2.25: AFFECTED (inside range [{&#34;introduced&#34;: &#34;0&#34;}, {&#34;last_affected&#34;: &#34;19.2.25&#34;}])
</span></span><span style="display:flex;"><span>GHSA-62vg-58rm-qff7 @angular/router@19.2.26: not affected (not inside any range or versions[])
</span></span><span style="display:flex;"><span>GHSA-62vg-58rm-qff7 @angular/router@20.0.0: AFFECTED (inside range [{&#34;introduced&#34;: &#34;20.0.0&#34;}, {&#34;fixed&#34;: &#34;20.3.33&#34;}])
</span></span><span style="display:flex;"><span>GHSA-vg28-83rp-8xx4 frigate@0.16.3: AFFECTED (inside range [{&#34;introduced&#34;: &#34;0&#34;}])
</span></span><span style="display:flex;"><span>GHSA-3r78-rqg8-95gg openclaw@2026.3.1: not affected (record withdrawn 2026-03-24T19:05:32Z)
</span></span></code></pre></div><p>Note the <code>4.6.0rc1</code> line. Under PEP 440 a release candidate sorts before <code>4.6.0</code>, so it falls outside <code>introduced 4.6.0</code>. Whether a prerelease really carries the bug is a question for the maintainers; the data only covers the versions it names.</p>
<h2 id="common-mistakes">Common mistakes</h2>
<ul>
<li><strong>Comparing version strings lexically.</strong> <code>&quot;4.10.0&quot; &lt; &quot;4.9.0&quot;</code> as strings. Use the ecosystem&rsquo;s comparator.</li>
<li><strong>Treating <code>last_affected</code> like <code>fixed</code>.</strong> It shifts the boundary by one version in the wrong direction, so the last vulnerable version gets marked safe.</li>
<li><strong>Reading only the first <code>affected</code> entry for a package.</strong> GitHub splits branches into separate entries.</li>
<li><strong>Ignoring <code>withdrawn</code>.</strong> Withdrawn duplicates often carry &ldquo;all versions&rdquo; ranges.</li>
<li><strong>Using <code>database_specific</code> as the source of truth.</strong> GitHub explicitly says not to.</li>
<li><strong>Matching by name across ecosystems.</strong> <code>jquery</code> on npm and <code>jquery-rails</code> on RubyGems are different packages with different version lines.</li>
</ul>
<h2 id="where-this-fits">Where this fits</h2>
<p>Version matching answers &ldquo;does this advisory apply to us?&rdquo;. It comes before the prioritization questions in the <a href="/posts/vulnerability-prioritization-workflow-cve-record-to-patch-ticket/">vulnerability prioritization workflow from CVE record to patch ticket</a>. If you consume CVE records as well as OSV, the <a href="/posts/cve-packageurl-purl-cve-json-5-2-affected-sbom-matching/">CVE packageURL guide</a> covers joining CVE JSON 5.2 records to SBOM purls. If a supplier says a matched version is not exploitable in their product, that statement belongs in VEX, covered in <a href="/posts/vex-explained-what-a-not-affected-statement-means-and-how-to-read-one/">VEX explained</a>. To join GHSA IDs to KEV and EPSS, see our <a href="/posts/ghsa-vs-cve-join-github-advisories-to-kev-and-epss/">GHSA vs CVE join guide</a>.</p>
<h2 id="limits-of-this-article">Limits of this article</h2>
<ul>
<li>The counts cover GitHub-reviewed advisories filed under 2026 at one commit. Other OSV sources, such as Go&rsquo;s vulndb, PyPA, distributions and osv.dev&rsquo;s own enrichment, may use <code>SEMVER</code>, <code>GIT</code>, <code>versions</code> and <code>limit</code> differently; we did not measure them.</li>
<li>osv.dev says it expands ranges into <code>versions</code> lists for supported ecosystems; we did not test osv.dev&rsquo;s API output.</li>
<li>The evaluator handles PyPI and npm only and was tested on the four records shown, not fuzzed against each ecosystem&rsquo;s reference implementation.</li>
<li>We did not check which <code>@angular/router</code> or <code>frigate</code> releases actually exist or contain fixes; the examples show how the records evaluate, not the state of those projects.</li>
</ul>
<h2 id="sources-and-verification">Sources and verification</h2>
<table>
  <thead>
      <tr>
          <th>Important claim</th>
          <th>Source</th>
          <th>Status</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Event semantics, one key per event, fixed vs last_affected, ECOSYSTEM/SEMVER/GIT definitions, <code>IsVulnerable</code> pseudocode, spec version 1.9.3</td>
          <td><a href="https://github.com/ossf/osv-schema/blob/main/docs/schema.md">OSV schema docs/schema.md</a></td>
          <td>Verified (verbatim)</td>
      </tr>
      <tr>
          <td><code>database_specific</code> values &ldquo;subject to change without notice&rdquo; and &ldquo;should not rely on them&rdquo;; <code>last_known_affected_version_range</code> purpose</td>
          <td><a href="https://github.com/github/advisory-database#database_specific-values">github/advisory-database README</a></td>
          <td>Verified (verbatim)</td>
      </tr>
      <tr>
          <td>Advisories published in OSV format</td>
          <td><a href="https://docs.github.com/en/enterprise-cloud@latest/code-security/concepts/vulnerability-reporting-and-management/github-advisory-database">GitHub Docs: GitHub Advisory Database</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>All counts (12,918 / 678 / 12,240 records; range types; events; database_specific disagreements; ecosystem split)</td>
          <td>advisory-database commit 11d8f435, computed by script</td>
          <td>Verified (computed)</td>
      </tr>
      <tr>
          <td>Evaluator output for GHSA-3325-v43h-43rv, GHSA-62vg-58rm-qff7, GHSA-vg28-83rp-8xx4, GHSA-3r78-rqg8-95gg</td>
          <td>Script run 2 December 2026</td>
          <td>Verified (run)</td>
      </tr>
  </tbody>
</table>
]]></content:encoded></item></channel></rss>