PYSEC vs GHSA vs CVE: Dedupe pip-audit Before KEV and EPSS

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.

Dozens of bundled newspaper stacks tied with white string, piled in columns against a pale wall
Photo by Octavian-Dan Craciun on Unsplash

Short answer: 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 CISA KEV and EPSS, merge rows whose id and aliases overlap, then use the CVE in each merged cluster as the join key.

This is the Python counterpart to our GHSA vs CVE join guide. The full patch-decision flow, from CVE record to ticket, is in the vulnerability prioritization workflow.

Method

  • PyPA Advisory Database at commit 6c98d1c (2 December 2026): every vulns/*/*.yaml file, parsed with PyYAML.
  • GitHub Advisory Database, advisories/github-reviewed at commit bf333b9 (4 December 2026): every OSV JSON file with at least one affected[].package.ecosystem equal to PyPI.
  • CISA KEV catalog version 2026.11.30 (1,810 entries) from cisagov/kev-data.
  • FIRST EPSS daily file for 2026-12-03 (model v2026.06.15) from empiricalsec/epss_scores.
  • pip-audit 2.10.1 (the latest release on PyPI on 4 December 2026), run with -r requirements.txt --no-deps --disable-pip -f json against pinned versions, using the default PyPI vulnerability service.

Records with a withdrawn timestamp are excluded. We merged records into clusters when any ID or alias was shared (a union-find over id and aliases). All counts below were computed with Python from those files.

Three IDs, three owners

IDExampleIssued byFormatWhat it covers
PYSECPYSEC-2025-36Python Packaging Advisory DatabaseOSV, stored as YAMLPackages on PyPI only, one record per affected package
GHSAGHSA-rvqx-wpfh-mfx7GitHub Advisory DatabaseOSV JSONMany ecosystems; one record can list several packages
CVECVE-2025-3248CVE Program CNAsCVE JSON 5Any product; the only key KEV and EPSS use

The PyPA README says much of its data is “collected from the NVD CVE feed” using a tool that “performs a lot of heuristics to match CVEs with exact Python packages and versions” plus “a small amount of human triage”. That explains why nearly every PYSEC record has a CVE alias.

Langflow’s unauthenticated RCE shows how the IDs fan out. GitHub’s advisory GHSA-rvqx-wpfh-mfx7 lists two packages, langflow and langflow-base, with one alias, CVE-2025-3248. PyPA has a separate PYSEC record for each package: PYSEC-2025-36 for langflow (aliases: the CVE only) and PYSEC-2026-380 for langflow-base (aliases: the CVE and the GHSA). One vulnerability, four IDs.

What the two databases contain

MeasurePyPA (PYSEC)GitHub-reviewed (PyPI GHSA)
Records7,9436,979
Withdrawn272265
Live7,6716,714
Live with a CVE alias7,6016,316
Live with a GHSA alias7,213n/a
Live with no CVE70398

Two points matter for joins:

  1. GitHub’s raw files alias only CVEs. None of the 6,714 live PyPI GHSA files lists a PYSEC ID in aliases. The link from PYSEC to GHSA lives on the PyPA side.
  2. PYSEC is per package. 608 PyPI GHSAs are aliased by more than one PYSEC record, typically because a project publishes several packages (a main package plus a -base or plugin package).

Merging all 14,385 live records on shared IDs gives 7,208 distinct vulnerability clusters:

Cluster containsClusters
PYSEC + GHSA + CVE6,011
PYSEC + CVE, no GHSA427
GHSA only (no PYSEC, no CVE)361
GHSA + CVE, no PYSEC340
PYSEC only (no GHSA, no CVE)68
PYSEC + GHSA, no CVE1
Total7,208

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.

Where pip-audit’s duplicates come from

pip-audit queries PyPI’s JSON API by default (-s pypi). PyPI’s JSON API documentation shows a vulnerabilities array whose example entries have "source": "osv" and link to osv.dev. On 4 December 2026, https://pypi.org/pypi/langflow/1.2.0/json returned both PYSEC-2025-36 and GHSA-rvqx-wpfh-mfx7, and the GHSA entry’s aliases were CVE-2025-3248, PYSEC-2025-36 and PYSEC-2026-380. That alias list is richer than GitHub’s raw file, which lists only the CVE.

Reading pip-audit 2.10.1’s source explains what happens next:

  • VulnerabilityResult.create() sorts each result’s IDs so that PYSEC comes first, then CVE, then everything else, and uses the first one as the primary id. The GHSA entry therefore becomes a result whose primary ID is PYSEC-2025-36.
  • The dedupe loop in _audit.py makes a first pass that adds every result whose ID starts with PYSEC, without checking aliases. Only the second pass, for non-PYSEC results, merges on overlapping aliases.

Both results now start with PYSEC, so both are kept. The run confirmed it:

$ pip-audit -r requirements.txt --no-deps --disable-pip
Found 58 known vulnerabilities in 1 package
Name     Version ID                  Fix Versions
-------- ------- ------------------- ------------
langflow 1.2.0   PYSEC-2025-36       1.3.0
langflow 1.2.0   PYSEC-2025-36       1.3.0
langflow 1.2.0   PYSEC-2025-243      1.5.1
...
Package (pinned)pip-audit rowsDistinct vulnerabilities after merge
langflow 1.2.05833
mlflow 2.10.09549
litellm 1.60.03424
starlette 0.40.0147

For langflow, 25 PYSEC IDs appeared twice, and one GHSA-only row (GHSA-j8f7-x8jm-wmm4) had no CVE. We could not test the -s osv service because api.osv.dev 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’s count as a metric, check it against a merged count.

The dedupe-then-join script

This script reads pip-audit JSON (which includes aliases 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.

"""Collapse pip-audit JSON rows into one finding per vulnerability, then join KEV and EPSS.
Usage: python3 dedupe_pip_audit.py audit.json known_exploited_vulnerabilities.json epss_scores-YYYY-MM-DD.csv.gz
"""
import csv, gzip, json, sys

audit, kev_path, epss_path = sys.argv[1:4]
kev = {v["cveID"]: v for v in json.load(open(kev_path))["vulnerabilities"]}
epss = {}
with gzip.open(epss_path, "rt") as fh:
    next(fh)  # '#model_version:...,score_date:...' comment line
    for row in csv.DictReader(fh):
        epss[row["cve"]] = float(row["epss"])

for dep in json.load(open(audit))["dependencies"]:
    clusters = []  # each cluster is a set of IDs (PYSEC, GHSA, CVE, ...)
    for v in dep.get("vulns", []):
        ids = {v["id"], *v["aliases"]}
        hits = [c for c in clusters if c & ids]
        for c in hits:
            ids |= c
            clusters.remove(c)
        clusters.append(ids)
    print(f'{dep["name"]} {dep["version"]}: {len(dep.get("vulns", []))} rows -> {len(clusters)} vulnerabilities')
    for ids in sorted(clusters, key=lambda c: -max((epss.get(i, 0) for i in c), default=0)):
        cves = sorted(i for i in ids if i.startswith("CVE-"))
        in_kev = [c for c in cves if c in kev]
        score = max((epss.get(c, 0.0) for c in cves), default=None)
        key = cves[0] if cves else sorted(ids)[0]
        print(f'  {key:18} kev={"yes" if in_kev else "no ":3} epss={score if score is not None else "n/a (no CVE)"} ids={",".join(sorted(ids - {key}))}')

Output for langflow 1.2.0 (first lines):

langflow 1.2.0: 58 rows -> 33 vulnerabilities
  CVE-2025-3248      kev=yes epss=0.99992 ids=GHSA-rvqx-wpfh-mfx7,PYSEC-2025-36,PYSEC-2026-380
  CVE-2026-33017     kev=yes epss=0.96814 ids=GHSA-vwmf-pq79-vjvx,PYSEC-2026-379
  CVE-2025-34291     kev=yes epss=0.93656 ids=GHSA-577h-p2hh-v4mv,PYSEC-2025-78
  CVE-2026-55255     kev=yes epss=0.69162 ids=GHSA-qrpv-q767-xqq2,PYSEC-2026-221
  CVE-2026-0770      kev=yes epss=0.62562 ids=GHSA-g22f-v6f7-2hrh,PYSEC-2026-1525

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.

KEV and EPSS coverage for PyPI

Across both databases there are 6,781 distinct CVE IDs attached to live PyPI advisories:

  • 6,745 have a score in the 2026-12-03 EPSS file; 192 score 0.1 or higher.
  • 24 are in KEV catalog 2026.11.30. They include Langflow, LiteLLM, MLflow, Apache Airflow, Superset and Spark, Salt, Starlette, Ray and Marimo.
  • 22 of those 24 appear in both PyPA and GitHub data. CVE-2026-102895 (GPUStack) had only a GHSA record and CVE-2026-133968 (MONAI Label) had only a PYSEC record in our snapshot.
  • 430 clusters have no CVE at all, so KEV and EPSS return nothing for them. Treat those with the approach in our GHSA without a CVE guide.

Common mistakes

  • Counting rows as vulnerabilities. pip-audit row counts, and naive unions of PyPA and GitHub data, overstate the real number. Merge first.
  • Keying tickets on whatever ID the scanner printed. 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.
  • Joining KEV on PYSEC or GHSA. KEV’s cveID and EPSS’s cve columns hold only CVE IDs. Pull the CVE out of the merged cluster.
  • Reading only one database. Each has PyPI vulnerabilities the other lacks, including two KEV-listed CVEs in this snapshot.

Limits of this article

  • Counts are a snapshot of PyPA commit 6c98d1c and GitHub commit bf333b9; both databases change daily.
  • 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.
  • 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.
  • The script is a minimal example. It does not handle --fix output, multiple requirement files or VEX suppression.

Sources and verification

Important claimSourceStatus
PyPA advisories are OSV-format YAML, mostly collected from NVD CVE data with heuristics and human triagepypa/advisory-database READMEVerified
Record, withdrawn, alias and cluster countspypa/advisory-database at 6c98d1c; github/advisory-database at bf333b9; computedVerified (snapshot)
PyPI’s JSON API returns a vulnerabilities array with OSV-sourced entries and a withdrawn timestampPyPI JSON API docsVerified
pip-audit defaults to the PyPI service, sorts PYSEC then CVE first, and adds all PYSEC results in a first passpip-audit 2.10.1 source (_cli.py, _service/interface.py, _audit.py)Verified (source read)
langflow 1.2.0: 58 rows, 33 distinct vulnerabilities, 25 duplicated PYSEC IDspip-audit 2.10.1 run, 4 December 2026Verified (our run)
24 PyPI CVEs in KEV; GPUStack and MONAI Label single-sourcecisagov/kev-data 2026.11.30 joined to both databasesVerified (snapshot)
EPSS coverage of PyPI CVEsempiricalsec/epss_scores 2026-12-03 fileVerified (snapshot)

Frequently asked questions

What is a PYSEC ID?

A PYSEC ID (for example PYSEC-2025-36) is the identifier assigned by the Python Packaging Advisory Database, a community-owned repository of OSV-format advisories for packages on PyPI. Many PYSEC entries are generated from NVD CVE data with automated package matching plus some human triage, so most carry a CVE alias.

Why does pip-audit show the same vulnerability twice?

In our run of pip-audit 2.10.1 against langflow 1.2.0, PyPI's JSON API returned both a PYSEC entry and a GHSA entry for the same flaw, and the GHSA entry's aliases included the PYSEC ID. pip-audit promotes PYSEC IDs to the primary ID and keeps every PYSEC-primary result in its first pass, so both rows printed under the same PYSEC ID. Merge rows whose id and aliases overlap before you count them.

Should I key vulnerability tickets on PYSEC, GHSA or CVE?

Key on a merged cluster, and pick the CVE as the display key when one exists, because CVE is the only ID that CISA KEV and FIRST EPSS accept. Keep the PYSEC and GHSA IDs as aliases on the ticket so a later scan that reports a different ID still matches the existing ticket.

Can a PyPI vulnerability be in KEV but only in one advisory database?

Yes. In our 4 December 2026 snapshot, 24 PyPI CVEs were in KEV. 22 appeared in both PyPA and GitHub data, but CVE-2026-102895 (GPUStack) had only a GHSA record and CVE-2026-133968 (MONAI Label) had only a PYSEC record. If you build your own join from a single database, you can miss a KEV entry.

PysecGhsaCvePip-AuditPypiPythonOsvCisa KevEpssVulnerability Management