# Global vulnerability dataset: schema

Built by `scripts/build_vuln_global.py` (tests: `tests/test_vuln_global.py`) from the dumps listed in `work/vuln-global/MANIFEST.tsv`. Sources and reuse terms: `docs/vulnerability-sources.md`.

Fields marked **derived** are ours (CC BY 4.0, AI Science Tracker); every other field keeps its source's attribution. Absence of a field value never means "not vulnerable", "not exploited" or "no fix".

## `vulnerabilities_global.jsonl.gz`: one row per vulnerability

One row per CVE in the CVE List (published, rejected, or a CISA KEV CVE missing from the snapshot), plus one row per vulnerability without a CVE (OSV allowlisted sources, GCVE, national databases). Every row has every key.

| Field | Meaning |
| --- | --- |
| `id`, `state` | CVE, GHSA, OSV, GCVE, CNVD, VAR, BDU or JVNDB ID; `PUBLISHED`, `REJECTED` or `NOT_IN_CVE_LIST_SNAPSHOT`. |
| `aliases` | Other IDs naming the same vulnerability (GHSA, PYSEC, RUSTSEC, EUVD, GCVE…). |
| `published`, `updated`, `assigner`, `title`, `description` | From the CVE record (CNA) or the source of a non-CVE row. Description is cut at 2,000 characters; surrounding whitespace and CNA formatting tags (such as Oracle's `<span>`) are removed. |
| `cwe` | `[{id, name}]` from the CNA, CISA ADP, NVD and GitHub. Names from MITRE CWE. |
| `capec` | `[{id, name, via}]`: `via` is `CNA` or the CWE that links to the attack pattern. |
| `attack_techniques` | `[{id, name, via}]`: MITRE ATT&CK techniques mapped from those CAPEC patterns (by the CAPEC catalog); inferred, not observed. |
| `cwe_top25`, `owasp_top10` | Whether a listed CWE is in MITRE's 2025 CWE Top 25, and the OWASP Top Ten 2021/2025 categories its CWEs belong to (from the CWE catalog's own views; 2025 is marked release candidate there). |
| `cvss` | Every score with its `source`, `version`, `score`, `vector`; never merged. A vector published without a score (GitHub and other OSV sources often do this) gets its score computed with FIRST's formulas and flagged `score_computed`. A published score its own vector does not give (a source error; for v4 the base metrics are compared, since CNAs leave threat metrics out of the base score) keeps the source's value and adds our `vector_score`. Calculators: v2/v3 match all 620,105 NVD scores; v4.0 is ported from FIRST's reference calculator and matches 99.8% of 29,505 CNA base scores and the majority value whenever CNAs disagree. |
| `severity` | **derived**: one score to sort by (the CNA's first, then CISA ADP, then NVD, newest CVSS version), its band, and `max_score` across sources. |
| `exposure` | **derived** from a CVSS vector: `attack_vector`, `attack_complexity`, `privileges_required`, `user_interaction`, `remote_unauthenticated`, with the vector's source. |
| `ssvc` | CISA's SSVC decision points (`exploitation` none/poc/active, `automatable`, `technical_impact`) and date. |
| `vuln_class` | **derived**: plain classes (memory corruption, SQL injection, path traversal…) from the CWEs; an unlisted CWE inherits its nearest listed parent. |
| `priority` | **derived** triage hint: `act now` (KEV, ENISA exploited, SSVC active), `high`, `medium`, `low`, `unknown`, with `reasons`. A heuristic, not vendor advice. |
| `affected`, `nvd_cpe`, `packages` | Raw product data: CVE 5 `affected` lists (CNA and ADP, with `source`), NVD CPE matches, OSV package ranges. |
| `products` | **derived** per product family: `product_key`, `names`, `sources`, `types` (application, operating system, hardware, package), `cpe`, `purl`, `ecosystems`, `fixed` versions (only the version token: 'macOS Mojave 10.14.5' becomes 10.14.5; placeholders, wildcards and words such as 'publication' dropped), `fixed_commits` (git hashes from git-typed ranges), `lifecycle` (endoflife.date ID when matched), `ranges` (`introduced`, `fixed`, `last_affected` or `any_version`, with `status` and source, at most 100; exact versions grouped as `versions`, up to 5,000), `category`. A CNA entry listing several products separated by `;` becomes one family each; version tails such as '24.0.0.194 and earlier' are removed from names; a vendorless name joins the same product of the row's assigner vendor when the row names it, else takes the vendor of a curated `vendorless_rules` pattern (MediaTek chips, Apple OS names…); a GitHub/GitLab URL given as product name becomes owner:repository. |
| `remediation` | `solutions`, `workarounds`, `vendor_exploitation_statement` (CNA text); **derived** `fixed_versions` by product, `patch_urls`, `vendor_advisory_urls`, `has_documented_fix`; `cisa_required_action` for KEV entries. |
| `fix_commits` | `[{repo, commit, url, source}]` (URL built for GitHub and GitLab repositories when the source gives none): fixing commits from commit links in the references, CNA git ranges and OSV GIT ranges (at most 50). |
| `repositories` | Source repositories named by the CNA or by the fixing commits. |
| `references` | `[{url, tags, sources}]` merged from the CNA, ADP and NVD. |
| `advisories` | `[{id, source, license, url}]`: distribution and vendor advisories, CERT-FR, CSAF feeds, national databases. `license` says whether only the reference is kept. |
| `kev` | CISA KEV: `date_added`, `due_date`, `ransomware`, `name`, `required_action`, `description`, `notes`. |
| `euvd` | ENISA EUVD ID, `exploited_since` (ISO date), link. |
| `epss` | FIRST EPSS score, percentile and date. |
| `exploits`, `exploit_summary` | Public exploit references (Exploit-DB, Metasploit, Nuclei, PoC-in-GitHub top 10), each once, and counts per source (an exploit filed under an alias CVE too is counted once), plus `kev`, `euvd_exploited`, `ransomware` (KEV "Known"), `public_exploit`, `sightings_exploited`, `sightings_poc`, and **derived** `maturity`: exploited in the wild, weaponized (Metasploit module), proof of concept, detection template (Nuclei only), none known. PoC repositories are unverified. |
| `sightings` | CIRCL Vulnerability-Lookup sighting counts by type with first and last date. |
| `credits` | `[{type, name}]` from the CVE record. |
| `timeline` | `reserved`, `public`, `published`, CNA `events`, `kev_added`, `kev_due`, `euvd_exploited_since`, `first_public_exploit` (Exploit-DB or PoC date), `first_sighting`, **derived** `days_to_kev` and `days_to_first_public_exploit` from publication. |
| `sources` | Every source that contributed, each as `name (licence or terms)`. |
| `summary` | **derived** one sentence built only from the row's fields (class, products, exposure, severity, exploitation, fix). |

## Aggregates

- `products.json.gz`: one entry per product family, counting exactly the families the rows list in `products` (CNA, ADP, NVD CPE and OSV together), (`product_key`, `vendor`, `product`, `category`, `variants`) with counts: `total`, `kev`, `exploited`, `public_exploit`, `remote_unauthenticated`, `with_documented_fix`, `ransomware`, `by_year`, `by_maturity`, `by_severity` (highest attributed score), `serious_by_year` (score ≥ 7), `by_priority`, top `vuln_class` and `cwe`, `latest_published`, `max_epss`.
- `categories.json.gz`: products grouped by curated category (`scripts/vuln_product_map.json`) for comparisons. Counts reflect disclosure and research attention as much as quality: never read them as a safety ranking.
- `product_lifecycle.json.gz`: endoflife.date release cycles (release and end-of-life dates, maintained flag, latest version) by `product_key`, matched through the CPE and purl identifiers endoflife.date publishes.
- `vendors.json.gz`: the same counts per vendor plus `top_products`; package ecosystems (npm, PyPI…) are not vendors.
- `weaknesses.json.gz`: the same counts per CWE with its `name`, derived `class` and `top_products`.
- `product_versions.jsonl.gz`: one line per (product family, published vulnerability) that states ranges or fixed versions, with `ranges`, `fixed`, `cpe`, `purl`, primary `score`, `priority` and `kev`: everything a version check needs without the full rows.
- `malicious_packages.jsonl.gz`: OpenSSF malicious packages, kept apart from vulnerabilities.
- `build_report.json`: row counts and per-source reconciliation.
