<?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>Osv | FirewallSync</title><link>https://firewallsync.com/tags/osv/</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:40:00 +0000</lastBuildDate><atom:link href="https://firewallsync.com/tags/osv/index.xml" rel="self" type="application/rss+xml"/><item><title>OSV-Scanner Git Submodules: What --include-git-root Changes</title><link>https://firewallsync.com/posts/osv-scanner-git-submodules-include-git-root-commit-scanning/</link><guid>https://firewallsync.com/posts/osv-scanner-git-submodules-include-git-root-commit-scanning/</guid><pubDate>Fri, 04 Dec 2026 04:40:00 +0000</pubDate><dc:creator>John Marshall</dc:creator><category>AppSec &amp; APIs</category><description>In OSV-Scanner v2.7.1 source, the extractor that queries submodule commit hashes runs only with --include-git-root. Without it, a C/C++ submodule is found only if it sits under a folder such as third_party or vendor, and its version is guessed from file hashes. Here is how each path works, what the JSON output fields mean, and how to check your own scan.</description><enclosure url="https://firewallsync.com/posts/osv-scanner-git-submodules-include-git-root-commit-scanning/cover_hu2206043767810644985.jpg" type="image/jpeg" length="0"/><media:content url="https://firewallsync.com/posts/osv-scanner-git-submodules-include-git-root-commit-scanning/cover_hu2206043767810644985.jpg" medium="image" type="image/jpeg" width="1200" height="630"/><content:encoded><![CDATA[<p><img src="https://firewallsync.com/posts/osv-scanner-git-submodules-include-git-root-commit-scanning/cover_hu2206043767810644985.jpg" alt="Close-up of a dense tangle of bare reddish-brown branches crossing over one another" width="1200" height="630"></p><p><strong>Short answer:</strong> OSV-Scanner&rsquo;s documentation says it &ldquo;will automatically scan git submodules&rdquo;, but in the v2.7.1 source the extractor that sends submodule commit hashes to osv.dev only runs when you pass <code>--include-git-root</code>. Without the flag, a C/C++ submodule is found only if it sits directly under a folder such as <code>third_party/</code> or <code>vendor/</code>, and its version is estimated from file hashes rather than read from Git. If your C/C++ dependencies are submodules, run <code>osv-scanner scan source -r --include-git-root .</code> and check the JSON for packages with a <code>commit</code> field.</p>
<p>We reached this by reading the source at tag <code>v2.7.1</code> (tagged 9 November 2026, the latest release tag on 4 December 2026). We could not run the OSV-Scanner binary in our environment, so the behaviour below is what the code does, not an observed scan. The last section shows how to confirm it on your own repository in a few minutes.</p>
<h2 id="two-ways-osv-scanner-finds-cc-code">Two ways OSV-Scanner finds C/C++ code</h2>
<p>C and C++ projects rarely have a lockfile, so OSV-Scanner&rsquo;s <a href="https://google.github.io/osv-scanner-v1/supported-languages-and-lockfiles/">C/C++ support</a> is &ldquo;based on commit-level data&rdquo;. The <code>directory</code> plugin preset, which is on by default for source scans alongside <code>lockfile</code> and <code>sbom</code>, holds two extractors:</p>
<table>
  <thead>
      <tr>
          <th>Extractor</th>
          <th>Triggers on</th>
          <th>What it sends to osv.dev</th>
          <th>Confidence</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>vcs/gitrepo</code></td>
          <td>Any <code>.git</code> <strong>directory</strong></td>
          <td>HEAD commit of that repository, plus the recorded commit of each submodule</td>
          <td>Exact commit</td>
      </tr>
      <tr>
          <td><code>filesystem/vendored</code></td>
          <td>A directory whose <strong>parent folder</strong> is named <code>3rdparty</code>, <code>dep</code>, <code>deps</code>, <code>thirdparty</code>, <code>third-party</code>, <code>third_party</code>, <code>libs</code>, <code>external</code>, <code>externals</code>, <code>vendor</code> or <code>vendored</code></td>
          <td>MD5 hashes of <code>.c</code>, <code>.cc</code>, <code>.cpp</code>, <code>.h</code>, <code>.hh</code>, <code>.hpp</code> files, to the experimental determineversion API</td>
          <td>Best match, used only if its score is above 0.15</td>
      </tr>
  </tbody>
</table>
<p>Both produce a package with a commit and no ecosystem. osv.dev&rsquo;s <a href="https://google.github.io/osv.dev/post-v1-query/"><code>/v1/query</code> endpoint</a> accepts &ldquo;the commit hash to query for&rdquo;. The commit-level data in OSV records comes from <code>GIT</code> ranges, which we covered in <a href="/posts/osv-git-ranges-commit-hashes-fixed-vs-limit-events/">OSV GIT ranges: commit hashes, fixed vs limit events</a>.</p>
<h2 id="what---include-git-root-actually-switches">What <code>--include-git-root</code> actually switches</h2>
<p>Two lines in <code>pkg/osvscanner/scan.go</code> at v2.7.1 decide the behaviour:</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-go" data-lang="go"><span style="display:flex;"><span><span style="color:#75715e">// configuring the vendored extractor
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">ScanGitDir</span>: !<span style="color:#a6e22e">actions</span>.<span style="color:#a6e22e">IncludeGitRoot</span>,
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// building the plugin list
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">if</span> !<span style="color:#a6e22e">actions</span>.<span style="color:#a6e22e">IncludeGitRoot</span> {
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">actions</span>.<span style="color:#a6e22e">PluginsDisabled</span> = append(<span style="color:#a6e22e">actions</span>.<span style="color:#a6e22e">PluginsDisabled</span>, <span style="color:#a6e22e">gitrepo</span>.<span style="color:#a6e22e">Name</span>)
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p>The flag&rsquo;s help text is &ldquo;include scanning git root (non-submoduled) repositories&rdquo;, and it defaults to <code>false</code>. But disabling <code>vcs/gitrepo</code> turns off more than root scanning:</p>
<ul>
<li><code>vcs/gitrepo</code> only fires on a <code>.git</code> path that is a directory. In a standard modern checkout, a submodule&rsquo;s <code>.git</code> is a small file pointing into the parent&rsquo;s <code>.git/modules/</code>, so the extractor normally fires once, on the superproject&rsquo;s <code>.git</code> directory.</li>
<li>From there it calls go-git&rsquo;s <code>Worktree().Submodules()</code> and emits one commit query per submodule. That loop is the only place in the v2.7.1 source that enumerates submodules.</li>
</ul>
<p>So with the default settings, no submodule commit reaches osv.dev from this extractor. With <code>--include-git-root</code>, you get the superproject&rsquo;s own HEAD commit <strong>and</strong> every submodule&rsquo;s commit.</p>
<p>The flag also flips the vendored extractor&rsquo;s <code>ScanGitDir</code> setting. With the flag, the vendored extractor skips any directory that contains a <code>.git</code> entry, which avoids reporting a submodule twice (once by exact commit, once by hash estimate).</p>
<h2 id="the-two-configurations-side-by-side">The two configurations side by side</h2>
<p>Assume a repository with a submodule at <code>third_party/zlib</code> and another at <code>src/libfoo</code>.</p>
<table>
  <thead>
      <tr>
          <th></th>
          <th>Default</th>
          <th><code>--include-git-root</code></th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Superproject HEAD commit queried</td>
          <td>No</td>
          <td>Yes</td>
      </tr>
      <tr>
          <td><code>third_party/zlib</code></td>
          <td>Hashed by the vendored extractor; version estimated</td>
          <td>Queried by exact recorded commit; vendored extractor skips it</td>
      </tr>
      <tr>
          <td><code>src/libfoo</code></td>
          <td><strong>Not scanned</strong> (parent folder <code>src</code> is not on the vendored list, and gitrepo is off)</td>
          <td>Queried by exact recorded commit</td>
      </tr>
      <tr>
          <td>Plain copied code in <code>vendor/libbar</code> (no <code>.git</code>)</td>
          <td>Hashed and estimated</td>
          <td>Hashed and estimated</td>
      </tr>
  </tbody>
</table>
<p>The superproject HEAD query is usually harmless for private code, because osv.dev has no <code>GIT</code> ranges for your repository. It matters if you are scanning a fork of a public project that does have OSV records.</p>
<h2 id="which-commit-is-queried-for-a-submodule">Which commit is queried for a submodule</h2>
<p><code>vcs/gitrepo</code> uses <code>status.Expected</code> from go-git. In go-git v5.19.3, the version OSV-Scanner v2.7.1 pins, <code>Expected</code> is set from the superproject&rsquo;s index entry for the submodule path, before go-git checks whether the submodule is initialised. Two practical results:</p>
<ol>
<li><strong>The recorded commit wins.</strong> If a developer ran <code>git checkout</code> inside a submodule but did not commit the new gitlink in the parent repository, OSV-Scanner still queries the commit the parent repository records.</li>
<li><strong>Uninitialised submodules can still be queried.</strong> The <code>Expected</code> hash comes from the index, not the submodule&rsquo;s files. The documentation&rsquo;s advice to run <code>git submodule update</code> first still matters for the vendored extractor, which needs the files on disk to hash them.</li>
</ol>
<p>If go-git returns an error for a submodule&rsquo;s status, the extractor skips that submodule silently (<code>continue</code>), so a broken submodule checkout can drop out of results without a warning.</p>
<h2 id="reading-commit-based-results">Reading commit-based results</h2>
<p>Commit-matched packages look different from lockfile packages in every output format. Field names below are from <code>pkg/models/results.go</code> at v2.7.1.</p>
<table>
  <thead>
      <tr>
          <th>Output</th>
          <th>Field</th>
          <th>Value for a commit-matched package</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>JSON</td>
          <td><code>results[].source.type</code></td>
          <td><code>git</code> for packages from <code>vcs/gitrepo</code></td>
      </tr>
      <tr>
          <td>JSON</td>
          <td><code>results[].packages[].package.ecosystem</code></td>
          <td><code>&quot;&quot;</code> (empty string)</td>
      </tr>
      <tr>
          <td>JSON</td>
          <td><code>results[].packages[].package.commit</code></td>
          <td>Full commit hash</td>
      </tr>
      <tr>
          <td>JSON</td>
          <td><code>results[].packages[].package.version</code></td>
          <td>Usually empty</td>
      </tr>
      <tr>
          <td>Table</td>
          <td>Ecosystem column</td>
          <td><code>GIT</code></td>
      </tr>
      <tr>
          <td>Table</td>
          <td>Version column</td>
          <td>First 8 characters of the commit</td>
      </tr>
      <tr>
          <td>SARIF</td>
          <td>Version shown in the result text</td>
          <td>Full commit hash</td>
      </tr>
  </tbody>
</table>
<p>In the v2.7.1 source, the location recorded for a submodule is the <code>.git</code> directory path joined with the submodule path, so expect <code>source.path</code> values ending in <code>.git/third_party/zlib</code> rather than <code>third_party/zlib</code>.</p>
<h2 id="check-your-own-repository">Check your own repository</h2>
<p>These commands are illustrative; they use flags documented for OSV-Scanner v2 and fields from the v2.7.1 result model. Run them from the superproject root.</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-bash" data-lang="bash"><span style="display:flex;"><span>git submodule status            <span style="color:#75715e"># list submodules and the commit each is pinned to</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>osv-scanner scan source -r --format json . &gt; default.json
</span></span><span style="display:flex;"><span>osv-scanner scan source -r --include-git-root --format json . &gt; gitroot.json
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Packages found by commit in each run</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">for</span> f in default.json gitroot.json; <span style="color:#66d9ef">do</span>
</span></span><span style="display:flex;"><span>  echo <span style="color:#e6db74">&#34;== </span>$f<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>  jq -r <span style="color:#e6db74">&#39;.results[] | .source as $s | .packages[]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">         | select(.package.commit != null)
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">         | [$s.type, $s.path, .package.commit[0:12], (.vulnerabilities // [] | length)]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">         | @tsv&#39;</span> <span style="color:#e6db74">&#34;</span>$f<span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">done</span>
</span></span></code></pre></div><p>If a submodule from <code>git submodule status</code> appears in <code>gitroot.json</code> but not in <code>default.json</code>, your default scans have been missing it.</p>
<h2 id="from-commit-findings-to-a-patch-decision">From commit findings to a patch decision</h2>
<p>A commit match gives you OSV IDs, not a package version to bump. To decide what to fix first:</p>
<ol>
<li>Read each result&rsquo;s <code>groups[].aliases</code> to find the CVE IDs.</li>
<li>Join those CVEs to the <a href="/posts/cisa-kev-json-feed-what-each-field-means-and-how-to-match-it-against-a-scanner-export/">CISA KEV feed</a> and EPSS.</li>
<li>Fix by moving the submodule to a commit that contains the fix (the <code>fixed</code> commit in the OSV record or a descendant of it), then commit the new gitlink in the parent repository.</li>
</ol>
<p>The full flow from CVE record to ticket is in our <a href="/posts/vulnerability-prioritization-workflow-cve-record-to-patch-ticket/">vulnerability prioritization workflow</a>.</p>
<h2 id="limits-of-this-article">Limits of this article</h2>
<ul>
<li>This is a source reading of OSV-Scanner v2.7.1, not a test run. The <code>main</code> branch has changed <code>scan.go</code> and the source command since that tag, though the lines quoted above have not moved in meaning.</li>
<li>The documentation and the code disagree on whether submodules are scanned by default. Our search did not turn up an issue explaining the intent. If a later release changes the behaviour, the documentation may become correct.</li>
<li>Commit-level coverage is incomplete. The OSV-Scanner documentation warns that &ldquo;there may be vulnerabilities in their dependencies that could be excluded from OSV-Scanner results&rdquo;.</li>
<li>The vendored extractor needs osv.dev. The source disables it when OSV-Scanner runs in offline comparison mode.</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>Docs say submodules are scanned automatically and root repos are skipped by default</td>
          <td><a href="https://google.github.io/osv-scanner/usage/scan-source">OSV-Scanner: Project Source Scanning</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td><code>vcs/gitrepo</code> disabled unless <code>--include-git-root</code>; vendored <code>ScanGitDir</code> tied to the flag</td>
          <td><a href="https://github.com/google/osv-scanner">google/osv-scanner</a> v2.7.1, <code>pkg/osvscanner/scan.go</code></td>
          <td>Verified (source read)</td>
      </tr>
      <tr>
          <td>Flag help text and default <code>false</code></td>
          <td>v2.7.1, <code>cmd/osv-scanner/scan/source/command.go</code></td>
          <td>Verified (source read)</td>
      </tr>
      <tr>
          <td>gitrepo fires on <code>.git</code> directories, queries HEAD and each submodule&rsquo;s <code>Expected</code> commit</td>
          <td>v2.7.1, <code>internal/scalibrextract/vcs/gitrepo/extractor.go</code></td>
          <td>Verified (source read)</td>
      </tr>
      <tr>
          <td><code>Expected</code> comes from the index entry before the initialisation check</td>
          <td><a href="https://github.com/go-git/go-git">go-git</a> v5.19.3, <code>submodule.go</code></td>
          <td>Verified (source read)</td>
      </tr>
      <tr>
          <td>Vendored folder names, file extensions, MD5 hashing, 0.15 threshold, 10,000-file cap</td>
          <td>v2.7.1, <code>internal/scalibrextract/filesystem/vendored/vendored.go</code></td>
          <td>Verified (source read)</td>
      </tr>
      <tr>
          <td>Default plugin presets <code>lockfile</code>, <code>sbom</code>, <code>directory</code>; <code>directory</code> holds both extractors</td>
          <td>v2.7.1, <code>pkg/osvscanner/scan.go</code>, <code>internal/scalibrplugin/presets.go</code></td>
          <td>Verified (source read)</td>
      </tr>
      <tr>
          <td>Output fields, <code>GIT</code> label and 8-character short commit</td>
          <td>v2.7.1, <code>pkg/models/results.go</code>, <code>internal/output/table.go</code>, <code>internal/utility/results/results.go</code></td>
          <td>Verified (source read)</td>
      </tr>
      <tr>
          <td>osv.dev accepts a commit hash in <code>/v1/query</code></td>
          <td><a href="https://google.github.io/osv.dev/post-v1-query/">osv.dev API: POST /v1/query</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>determineversion estimates vendored C/C++ versions with a confidence score</td>
          <td><a href="https://osv.dev/blog/posts/using-the-determineversion-api/">osv.dev blog: Using the determineversion API</a></td>
          <td>Verified</td>
      </tr>
  </tbody>
</table>
]]></content:encoded></item><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>OSV GIT Ranges: Commit Hashes, fixed vs limit Events</title><link>https://firewallsync.com/posts/osv-git-ranges-commit-hashes-fixed-vs-limit-events/</link><guid>https://firewallsync.com/posts/osv-git-ranges-commit-hashes-fixed-vs-limit-events/</guid><pubDate>Thu, 03 Dec 2026 04:40:00 +0000</pubDate><dc:creator>Craig Leslie</dc:creator><category>AppSec &amp; APIs</category><description>How OSV GIT ranges work: introduced and fixed are full commit hashes evaluated on the commit graph, cherry-picked fixes must each be listed, and limit trades false positives for false negatives. With counts from PyPA, OSS-Fuzz and GHSA data and a tested git-based evaluator.</description><enclosure url="https://firewallsync.com/posts/osv-git-ranges-commit-hashes-fixed-vs-limit-events/cover_hu10549478243202500838.jpg" type="image/jpeg" length="0"/><media:content url="https://firewallsync.com/posts/osv-git-ranges-commit-hashes-fixed-vs-limit-events/cover_hu10549478243202500838.jpg" medium="image" type="image/jpeg" width="1200" height="630"/><content:encoded><![CDATA[<p><img src="https://firewallsync.com/posts/osv-git-ranges-commit-hashes-fixed-vs-limit-events/cover_hu10549478243202500838.jpg" alt="Bare, dark tree branches forking in every direction against a pale grey sky" width="1200" height="630"></p><p><strong>Short answer:</strong> An OSV range of type <code>GIT</code> describes affected code by <strong>commit hash</strong>, not version number. <code>introduced</code> and <code>fixed</code> are full 40-character hashes in the repository named by <code>repo</code>, and &ldquo;greater than&rdquo; means &ldquo;descends from&rdquo; in the commit graph. A <code>fixed</code> commit clears only its own descendants, so a fix cherry-picked onto a release branch must be listed as a second <code>fixed</code> event or that branch stays flagged. A <code>limit</code> event does the opposite job: it shrinks the range to the ancestors of one commit, which drops other branches and can hide real exposure. In three large OSV datasets we checked, nobody uses <code>limit</code>.</p>
<p>This is the commit-graph companion to our <a href="/posts/osv-schema-ranges-introduced-fixed-last-affected-ghsa/">OSV schema ranges guide</a>, which covers <code>ECOSYSTEM</code> and <code>SEMVER</code> ranges and deliberately refuses <code>GIT</code>. If you work from CVE records rather than OSV, the equivalent is <code>versionType: git</code>, which we touched on in the <a href="/posts/cve-affected-versions-lessthan-defaultstatus-versiontype/">CVE affected versions guide</a> and the <a href="/posts/linux-kernel-cve-records-affected-versions-stable-branches/">Linux kernel CVE ranges article</a>.</p>
<h2 id="when-you-meet-a-git-range">When you meet a GIT range</h2>
<p>You need GIT ranges when there is no package version to compare: vendored C/C++ libraries, git submodules, code built from a commit, or fuzzing findings that predate any release. OSV.dev&rsquo;s own blog puts the problem plainly: &ldquo;C/C++ does not have a centralized package manager like npm or pyPI,&rdquo; and &ldquo;Software projects typically pull in C/C++ by submodules or vendoring.&rdquo;</p>
<p>The spec (OSV schema <strong>1.9.3</strong>, dated 30 November 2026) defines the type like this:</p>
<blockquote>
<p><code>GIT</code>: The versions <code>introduced</code> and <code>fixed</code> are full-length Git commit hashes. The repository&rsquo;s commit graph is needed to evaluate whether a given version is in the range. The relation <code>u &lt; v</code> is true when commit <code>u</code> is a (perhaps distant) parent of commit <code>v</code>.</p>
</blockquote>
<p>Two consequences follow:</p>
<ul>
<li><code>repo</code> is <strong>required</strong> for GIT ranges, and it must be usable as an argument to <code>git clone</code>.</li>
<li>You cannot evaluate a GIT range from the record alone. The spec says so directly: &ldquo;<code>GIT</code> range inclusion queries cannot be answered without access to a copy of the underlying Git repository.&rdquo; That is why it still asks for an enumerated <code>versions</code> list (tags) alongside GIT ranges.</li>
</ul>
<h2 id="the-four-events-read-as-graph-questions">The four events, read as graph questions</h2>
<table>
  <thead>
      <tr>
          <th>Event</th>
          <th>Value in a GIT range</th>
          <th>Question you ask the graph</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>introduced</code></td>
          <td>Commit hash, or <code>&quot;0&quot;</code></td>
          <td>Is this commit an ancestor of (or equal to) mine? <code>&quot;0&quot;</code> means &ldquo;from the start of history&rdquo;.</td>
      </tr>
      <tr>
          <td><code>fixed</code></td>
          <td>Commit hash</td>
          <td>Is this fix commit an ancestor of (or equal to) mine? If yes, I am fixed.</td>
      </tr>
      <tr>
          <td><code>last_affected</code></td>
          <td>Commit hash</td>
          <td>Allowed by the spec, but cannot share an <code>events</code> array with <code>fixed</code>. Rare in GIT data.</td>
      </tr>
      <tr>
          <td><code>limit</code></td>
          <td>Commit hash, or <code>&quot;*&quot;</code></td>
          <td>Is my commit a strict ancestor of a limit commit? If no limit exists, an implicit <code>&quot;*&quot;</code> (infinity) applies.</td>
      </tr>
  </tbody>
</table>
<p>The spec allows only one key per event object, and requires at least one <code>introduced</code>.</p>
<h2 id="fixed-versus-limit-a-tested-example">fixed versus limit: a tested example</h2>
<p>The spec explains the trade-off in one paragraph:</p>
<blockquote>
<p><code>events</code> arrays with <code>fixed</code> events must include all other cherrypicked fix commits in all branches as separate <code>fixed</code> events to avoid <em>false positive</em> matches in other branches. Conversely, <code>limit</code> events restrict the set of vulnerable commits to those reachable from the <code>limit</code>, which may result in <em>false negatives</em>. Where possible, it&rsquo;s strongly recommended to use <code>fixed</code> over <code>limit</code>.</p>
</blockquote>
<p>To see it, we built a toy repository: <code>main</code> runs <code>X - A - B - FIX - M</code>, and <code>release/1.x</code> branches at <code>A</code> with <code>R1</code>, <code>R2</code>, then <code>R3</code>, a <code>git cherry-pick -x</code> of <code>FIX</code>.</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-sh" data-lang="sh"><span style="display:flex;"><span><span style="color:#75715e">#!/bin/sh
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#75715e"># Toy repo: main X-A-B-FIX-M; release/1.x branched at A with R1, R2, then cherry-picked fix R3.</span>
</span></span><span style="display:flex;"><span>set -e
</span></span><span style="display:flex;"><span>rm -rf toy <span style="color:#f92672">&amp;&amp;</span> git init -q -b main toy <span style="color:#f92672">&amp;&amp;</span> cd toy
</span></span><span style="display:flex;"><span>git config user.email t@example.com <span style="color:#f92672">&amp;&amp;</span> git config user.name t
</span></span><span style="display:flex;"><span>c<span style="color:#f92672">(){</span> echo <span style="color:#e6db74">&#34;</span>$1<span style="color:#e6db74">&#34;</span> &gt;&gt; log <span style="color:#f92672">&amp;&amp;</span> git add log <span style="color:#f92672">&amp;&amp;</span> git commit -qm <span style="color:#e6db74">&#34;</span>$1<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">&amp;&amp;</span> git tag <span style="color:#e6db74">&#34;</span>$1<span style="color:#e6db74">&#34;</span>; <span style="color:#f92672">}</span>
</span></span><span style="display:flex;"><span>c X; c A; git checkout -qb release/1.x; c R1; c R2; git checkout -q main; c B
</span></span><span style="display:flex;"><span>echo fix &gt; fix <span style="color:#f92672">&amp;&amp;</span> git add fix <span style="color:#f92672">&amp;&amp;</span> git commit -qm FIX <span style="color:#f92672">&amp;&amp;</span> git tag FIX; c M
</span></span><span style="display:flex;"><span>git checkout -q release/1.x <span style="color:#f92672">&amp;&amp;</span> git cherry-pick -x FIX &gt;/dev/null <span style="color:#f92672">&amp;&amp;</span> git tag R3
</span></span></code></pre></div><p>The evaluator below uses <code>git merge-base --is-ancestor</code> for every comparison. It is <strong>illustrative</strong>: it treats a commit as affected when it descends from any <code>introduced</code> commit and from no <code>fixed</code> commit, which is correct for single-introduced ranges like these but not for ranges that re-introduce a bug after a fix. It is not OSV.dev&rsquo;s implementation. For readability the demo range files use tag names; real records use full hashes, and the script resolves both.</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;Evaluate an OSV GIT range against commits of a local clone. Illustrative.&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> subprocess<span style="color:#f92672">,</span> sys<span style="color:#f92672">,</span> json
</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_anc</span>(repo, a, b):
</span></span><span style="display:flex;"><span>    <span style="color:#e6db74">&#34;&#34;&#34;True if commit a is an ancestor of (or equal to) commit b.&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> subprocess<span style="color:#f92672">.</span>run([<span style="color:#e6db74">&#34;git&#34;</span>, <span style="color:#e6db74">&#34;-C&#34;</span>, repo, <span style="color:#e6db74">&#34;merge-base&#34;</span>, <span style="color:#e6db74">&#34;--is-ancestor&#34;</span>, a, b])<span style="color:#f92672">.</span>returncode <span style="color:#f92672">==</span> <span style="color:#ae81ff">0</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">resolve</span>(repo, ref):
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> subprocess<span style="color:#f92672">.</span>check_output([<span style="color:#e6db74">&#34;git&#34;</span>, <span style="color:#e6db74">&#34;-C&#34;</span>, repo, <span style="color:#e6db74">&#34;rev-parse&#34;</span>, ref], text<span style="color:#f92672">=</span><span style="color:#66d9ef">True</span>)<span style="color:#f92672">.</span>strip()
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">affected</span>(repo, rng, commit):
</span></span><span style="display:flex;"><span>    <span style="color:#75715e"># Resolve every event to a full hash (&#34;0&#34; and &#34;*&#34; are OSV special values).</span>
</span></span><span style="display:flex;"><span>    ev <span style="color:#f92672">=</span> [{k: (v <span style="color:#66d9ef">if</span> v <span style="color:#f92672">in</span> (<span style="color:#e6db74">&#34;0&#34;</span>, <span style="color:#e6db74">&#34;*&#34;</span>) <span style="color:#66d9ef">else</span> resolve(repo, v)) <span style="color:#66d9ef">for</span> k, v <span style="color:#f92672">in</span> e<span style="color:#f92672">.</span>items()} <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> [e[<span style="color:#e6db74">&#34;limit&#34;</span>] <span style="color:#66d9ef">for</span> e <span style="color:#f92672">in</span> ev <span style="color:#66d9ef">if</span> <span style="color:#e6db74">&#34;limit&#34;</span> <span style="color:#f92672">in</span> e <span style="color:#f92672">and</span> e[<span style="color:#e6db74">&#34;limit&#34;</span>] <span style="color:#f92672">!=</span> <span style="color:#e6db74">&#34;*&#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(is_anc(repo, commit, l) <span style="color:#f92672">and</span> commit <span style="color:#f92672">!=</span> l <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></span><span style="display:flex;"><span>    intro <span style="color:#f92672">=</span> [e[<span style="color:#e6db74">&#34;introduced&#34;</span>] <span style="color:#66d9ef">for</span> e <span style="color:#f92672">in</span> ev <span style="color:#66d9ef">if</span> <span style="color:#e6db74">&#34;introduced&#34;</span> <span style="color:#f92672">in</span> e]
</span></span><span style="display:flex;"><span>    fixed <span style="color:#f92672">=</span> [e[<span style="color:#e6db74">&#34;fixed&#34;</span>] <span style="color:#66d9ef">for</span> e <span style="color:#f92672">in</span> ev <span style="color:#66d9ef">if</span> <span style="color:#e6db74">&#34;fixed&#34;</span> <span style="color:#f92672">in</span> e]
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> <span style="color:#f92672">not</span> any(i <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;0&#34;</span> <span style="color:#f92672">or</span> is_anc(repo, i, commit) <span style="color:#66d9ef">for</span> i <span style="color:#f92672">in</span> intro):
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">False</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> <span style="color:#f92672">not</span> any(is_anc(repo, f, commit) <span style="color:#66d9ef">for</span> f <span style="color:#f92672">in</span> fixed)
</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>    repo, rng_file, <span style="color:#f92672">*</span>commits <span style="color:#f92672">=</span> sys<span style="color:#f92672">.</span>argv[<span style="color:#ae81ff">1</span>:]
</span></span><span style="display:flex;"><span>    rng <span style="color:#f92672">=</span> json<span style="color:#f92672">.</span>load(open(rng_file))
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">for</span> c <span style="color:#f92672">in</span> commits:
</span></span><span style="display:flex;"><span>        print(c, <span style="color:#e6db74">&#34;AFFECTED&#34;</span> <span style="color:#66d9ef">if</span> affected(repo, rng, resolve(repo, c)) <span style="color:#66d9ef">else</span> <span style="color:#e6db74">&#34;not affected&#34;</span>)
</span></span></code></pre></div><p>We ran it with Python 3.13 and git 2.43 against three ranges (<code>python3 osv_git_eval.py toy r1.json X A B FIX M R1 R2 R3</code>):</p>
<table>
  <thead>
      <tr>
          <th>Commit</th>
          <th>r1: <code>introduced X, fixed FIX</code></th>
          <th>r2: <code>+ fixed R3</code></th>
          <th>r3: <code>introduced X, limit FIX</code></th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>X, A, B</td>
          <td>affected</td>
          <td>affected</td>
          <td>affected</td>
      </tr>
      <tr>
          <td>FIX, M</td>
          <td>not affected</td>
          <td>not affected</td>
          <td>not affected</td>
      </tr>
      <tr>
          <td>R1, R2</td>
          <td>affected</td>
          <td>affected</td>
          <td><strong>not affected</strong></td>
      </tr>
      <tr>
          <td>R3 (has the cherry-picked fix)</td>
          <td><strong>affected</strong></td>
          <td>not affected</td>
          <td>not affected</td>
      </tr>
  </tbody>
</table>
<ul>
<li><strong>r1</strong> flags R3 even though it contains the fix: a false positive, because the cherry-pick has its own hash.</li>
<li><strong>r2</strong> adds the cherry-pick as a second <code>fixed</code> event and gets every commit right.</li>
<li><strong>r3</strong> returns X, A and B, matching the spec&rsquo;s description of <code>limit</code> as &ldquo;equivalent to <code>git rev-list X..Y</code> (but including <code>X</code> and excluding <code>Y</code>)&rdquo;. It also clears R1 and R2, which are still vulnerable: a false negative.</li>
</ul>
<p>If you consume GIT ranges, prefer a false positive you can suppress with a <a href="/posts/vex-explained-what-a-not-affected-statement-means-and-how-to-read-one/">VEX not_affected statement</a> over a false negative nobody sees.</p>
<h2 id="what-real-osv-data-uses">What real OSV data uses</h2>
<p>We counted GIT ranges in three public OSV sources (Python 3.13, PyYAML 6.0.3):</p>
<table>
  <thead>
      <tr>
          <th>Source (commit)</th>
          <th>Records</th>
          <th>Records with GIT ranges</th>
          <th>GIT ranges</th>
          <th>Ranges with &gt;1 <code>fixed</code></th>
          <th>Ranges with no <code>fixed</code></th>
          <th><code>limit</code> events</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><a href="https://github.com/pypa/advisory-database">pypa/advisory-database</a> (<code>6c98d1c</code>, 2 Dec 2026)</td>
          <td>7,943</td>
          <td>1,551</td>
          <td>1,558</td>
          <td>174</td>
          <td>0</td>
          <td>0</td>
      </tr>
      <tr>
          <td><a href="https://github.com/google/oss-fuzz-vulns">google/oss-fuzz-vulns</a> (<code>f120110</code>, 2 Dec 2026)</td>
          <td>4,128</td>
          <td>4,108</td>
          <td>4,108</td>
          <td>581</td>
          <td>265</td>
          <td>0</td>
      </tr>
      <tr>
          <td><a href="https://github.com/github/advisory-database">github/advisory-database</a> reviewed (<code>85ddf6c</code>, 3 Dec 2026)</td>
          <td>38,222</td>
          <td>0</td>
          <td>0</td>
          <td>n/a</td>
          <td>n/a</td>
          <td>0</td>
      </tr>
  </tbody>
</table>
<p>What the counts show:</p>
<ul>
<li><strong>Nobody uses <code>limit</code>.</strong> Zero events across all three. Support it in a consumer, but expect to see it rarely.</li>
<li><strong>PyPA pairs GIT with ECOSYSTEM in the same entry.</strong> All 1,551 PyPA records with a GIT range also carry an <code>ECOSYSTEM</code> range, inside the same <code>affected</code> object as the PyPI package. 1,555 of the 1,558 ranges start at <code>introduced: &quot;0&quot;</code>. Example: PYSEC-2017-3 (ansible, CVE-2015-6240) has a GIT range with two <code>fixed</code> commits plus an ECOSYSTEM range and 45 enumerated versions. Spec 1.9.3 recommends a different layout, a separate <code>affected</code> entry with no <code>package</code> for Git details, so expect both shapes.</li>
<li><strong>OSS-Fuzz is GIT-first.</strong> 4,108 of 4,128 records use GIT ranges, almost all (4,097) under the <code>OSS-Fuzz</code> ecosystem. The 265 ranges without a <code>fixed</code> event are open-ended: per the spec&rsquo;s implicit <code>limit: &quot;*&quot;</code>, everything descending from <code>introduced</code> is affected. Only 1,645 of the source files enumerate <code>versions</code>; the spec notes OSV.dev can populate that list from tags during ingestion.</li>
<li><strong>GitHub-reviewed advisories never use GIT ranges</strong>, so a Dependabot-style pipeline built on GHSA data never needs this code path.</li>
</ul>
<h2 id="how-to-match-vendored-code">How to match vendored code</h2>
<ol>
<li><strong>Find the commit.</strong> For a submodule, <code>git submodule status</code> gives it. For a vendored copy with no history, OSV.dev&rsquo;s experimental <code>determineversion</code> API, described in its July 2023 blog post, estimates the likely upstream version of a local C/C++ library.</li>
<li><strong>Ask OSV.dev, or evaluate locally.</strong> <code>POST /v1/query</code> accepts <code>{&quot;commit&quot;: &quot;&lt;hash&gt;&quot;}</code>; the docs say that if <code>commit</code> is specified, <code>version</code> should not be set, and the package is optional. To evaluate locally, clone the <code>repo</code> and use ancestry checks as above.</li>
<li><strong>Check every <code>fixed</code> event, not just the first.</strong> One per branch is normal.</li>
<li><strong>Do not string-compare hashes.</strong> Hashes have no order. Only the graph does.</li>
<li><strong>Feed the result into the same triage as everything else.</strong> A GIT-matched record still needs a CVE alias before KEV or EPSS can help; see the <a href="/posts/vulnerability-prioritization-workflow-cve-record-to-patch-ticket/">vulnerability prioritization workflow</a>.</li>
</ol>
<h2 id="common-mistakes">Common mistakes</h2>
<ul>
<li><strong>Treating <code>fixed</code> as &ldquo;everything after this date&rdquo;.</strong> It clears only descendants of that commit. A branch cut before the fix stays affected unless its own cherry-pick is listed.</li>
<li><strong>Shallow clones.</strong> <code>git clone --depth 1</code> lacks the history needed for ancestry checks; <code>merge-base --is-ancestor</code> will fail or mislead. Fetch enough history to contain the <code>introduced</code> commit.</li>
<li><strong>Abbreviated hashes.</strong> The spec says full-length hashes. Resolve short ones before comparing, as the script does.</li>
<li><strong>Mixing tag versions with ecosystem versions.</strong> The spec warns that <code>versions</code> under a GIT range &ldquo;typically represent Git tags and cannot be relied upon to conform to any particular package manager&rsquo;s syntax&rdquo;.</li>
</ul>
<h2 id="limits-of-this-article">Limits of this article</h2>
<ul>
<li>The evaluator is a simplified illustration and mishandles ranges that re-introduce a bug after a fix. Use OSV.dev or a maintained scanner in production.</li>
<li>Data counts are from repository source files at the commits shown, not from OSV.dev&rsquo;s enriched exports, which may add <code>versions</code>. We could not download OSV.dev&rsquo;s bulk exports from our environment.</li>
<li>We did not test OSV-Scanner&rsquo;s GIT handling or the <code>determineversion</code> API.</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>GIT type definition, <code>u &lt; v</code> relation, <code>repo</code> required, <code>versions</code> still required, event rules, fixed vs limit trade-off, limit example semantics</td>
          <td><a href="https://github.com/ossf/osv-schema/blob/main/docs/schema.md">OSV schema 1.9.3, docs/schema.md</a></td>
          <td>Verified (quoted)</td>
      </tr>
      <tr>
          <td>Separate Git entries without <code>package</code> recommended</td>
          <td>Same, &ldquo;Separating Git and Strict Ecosystems&rdquo;</td>
          <td>Verified (quoted)</td>
      </tr>
      <tr>
          <td><code>commit</code> field in <code>POST /v1/query</code>; <code>version</code> must not be set; package optional</td>
          <td><a href="https://google.github.io/osv.dev/post-v1-query/">OSV.dev API: POST /v1/query</a></td>
          <td>Verified (quoted)</td>
      </tr>
      <tr>
          <td>C/C++ has no central package manager; <code>determineversion</code> is experimental</td>
          <td><a href="https://osv.dev/blog/posts/using-the-determineversion-api/">OSV.dev blog, 20 July 2023</a></td>
          <td>Verified (quoted)</td>
      </tr>
      <tr>
          <td>Toy repository results for r1, r2, r3</td>
          <td>Script run 3 December 2026, Python 3.13, git 2.43</td>
          <td>Verified (run)</td>
      </tr>
      <tr>
          <td>All counts in the data table</td>
          <td>Script run 3 December 2026 on the commits shown</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>