CWE/CVE Lookup Skill
Run all commands with uv run:
SCRIPT=.claude/skills/cve-cwe/scripts/cve_cwe.py
Commands
| Command | Purpose | Example |
|---|---|---|
cwe <id> |
Full CWE details by ID | uv run $SCRIPT cwe 416 |
cwe-search <keyword> |
Search CWE by keyword (local XML cache) | uv run $SCRIPT cwe-search "buffer overflow" |
cve <id> |
Full CVE details by ID | uv run $SCRIPT cve CVE-2024-1086 |
cve-search <keyword> |
Search CVEs by keyword (NVD API) | uv run $SCRIPT cve-search "use after free" |
cwe-cves <cwe-id> |
Find CVEs associated with a CWE | uv run $SCRIPT cwe-cves CWE-416 |
cve-cwes <cve-id> |
Find CWEs associated with a CVE (with full CWE details) | uv run $SCRIPT cve-cwes CVE-2024-1086 |
Options
cve-search and cwe-cves accept:
--severity LOW|MEDIUM|HIGH|CRITICAL— filter by CVSS v3 severity--limit <n>— max results (default: 10, max: 50)
Notes
- CWE keyword search downloads MITRE's XML database on first use (~8 MB, cached at
/tmp/cwe_cache/) - NVD API has a rate limit of 5 requests per 30 seconds (no API key)
- CWE IDs accept both
416andCWE-416formats; CVE IDs accept both2024-1086andCVE-2024-1086
Report Usage
When citing CWE/CVE in reports, use the output to construct accurate references:
- CWE:
[CWE-416](https://cwe.mitre.org/data/definitions/416.html) (Use After Free) - CVE:
[CVE-2024-1086](https://nvd.nist.gov/vuln/detail/CVE-2024-1086)