fetch-cwe-list
A Node.js module to fetch, extract, and parse the latest or any specific CWE list from MITRE.
Install / Use
claude mcp add alejandrosaenz117 -- npx -y github:alejandrosaenz117/fetch-cwe-listIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
SecuritySupported Platforms
Our assessment of fetch-cwe-list
fetch-cwe-list scores 77/100 on our quality scale, 1017th of 1,104 Security skills we index.
Its MCP Server is 5.5 KB long, well organised into 18 sections with 8 code examples: a solid amount of guidance for an agent.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 44 days ago, so fetch-cwe-list is actively maintained.
- Our last check on 2026-09-29 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
fetch-cwe-list compared with similar skills
All 4 of these similar skills score higher than fetch-cwe-list; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| fetch-cwe-list (this skill)by alejandrosaenz117 | 77 | 10 | 44d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 97.1k | 5d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 75.3k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.4k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 87.3k | today | MCP Server |
Frequently asked questions
- How do I install fetch-cwe-list?
- Run
claude mcp add alejandrosaenz117 -- npx -y github:alejandrosaenz117/fetch-cwe-list. The install tabs above show the steps for each supported agent. - Which AI agents does fetch-cwe-list work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is fetch-cwe-list safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is fetch-cwe-list still maintained?
- The repository was last updated 44 days ago, so fetch-cwe-list is actively maintained.
Skill content
View source on GitHubfetch-cwe-list
A simple, secure Node.js module that fetches and parses the latest Common Weakness Enumeration (CWE) list from MITRE.
Quick Start
npm install fetch-cwe-list
const fetchCweList = require('fetch-cwe-list')
// Fetch latest CWE list
const cweList = await fetchCweList()
console.log(`Fetched ${cweList.length} CWE entries`)
// Fetch specific version
const cweListV413 = await fetchCweList('4.13')
That's it. Each entry includes parsed CWE data with enriched external references.
Features
- Live data — Always current, fetched directly from MITRE
- Enriched — CAPEC mappings, CVE context, hierarchy relationships, external references
- Cached — Optional 1-hour TTL cache (configurable)
- Query helpers —
findById,findByName,findByCapecfor common lookups - Secure — 30s timeout, 100MB size limit, XXE protection, no shared state
- TypeScript — Full type definitions included
Usage
Fetch and iterate
const cweList = await fetchCweList()
cweList.forEach(cwe => {
console.log(`${cwe.ID}: ${cwe.Name}`)
})
Use query helpers
const { findById, findByName, findByCapec } = require('fetch-cwe-list')
const cweList = await fetchCweList()
const cwe79 = findById(cweList, '79')
const injections = findByName(cweList, 'injection')
const xssCwes = findByCapec(cweList, '209') // CAPEC-209: XSS Using MIME Type Mismatch
Access enriched data
const cweList = await fetchCweList()
const cwe79 = findById(cweList, '79')
// CAPEC attack patterns
console.log(cwe79.CAPEC_IDs) // ['63', '85', '209', '588', '591', '592']
// Hierarchy (parent weaknesses)
console.log(cwe79.Hierarchy.parents) // ['74']
// Known CVEs
cwe79.Known_CVEs.forEach(({ id, description }) => {
console.log(`${id}: ${description}`)
})
Cache control
const { clearCache } = require('fetch-cwe-list')
const list1 = await fetchCweList() // Downloads, caches for 1 hour
const list2 = await fetchCweList() // Instant (cached)
// Bypass cache
const fresh = await fetchCweList('latest', { cache: false })
// Invalidate cache
clearCache()
API Reference
fetchCweList([version], [opts])
Parameters:
version(string, optional) — CWE version to fetch (e.g.,'4.13'). Defaults to'latest'.opts(object, optional) — Options:cache(boolean, optional) — Set tofalseto bypass cache. Default:true
Returns:
- Promise resolving to array of CWE objects
Throws:
- Error if download fails, timeout occurs, or version not found
clearCache()
Clears the in-memory cache. The cache instance itself is not exposed to prevent external poisoning via cache.set().
findById(cweList, id)
Find a single CWE by its ID string.
Parameters:
cweList— Array returned byfetchCweList()id(string) — The CWE ID, e.g.,'79'
Returns:
- CWE object or
undefined
findByName(cweList, pattern)
Find all CWEs whose name contains the given string (case-insensitive).
Parameters:
cweList— Array returned byfetchCweList()pattern(string) — Case-insensitive substring
Returns:
- Array of CWE objects
Note: RegExp is intentionally not supported to prevent ReDoS attacks.
findByCapec(cweList, capecId)
Find all CWEs that map to a given CAPEC ID string.
Parameters:
cweList— Array returned byfetchCweList()capecId(string) — The CAPEC ID, e.g.,'86'
Returns:
- Array of CWE objects
Data Structure
Each CWE entry contains MITRE's fields plus enriched data after v0.1.0:
| Field | Type | Always present | Description |
|-------|------|---------------|-------------|
| ID | string | Yes | CWE ID (normalized from numeric parser output) |
| CAPEC_IDs | string[] | Yes | Mapped CAPEC attack pattern IDs (empty array if none) |
| Known_CVEs | { id, description }[] | Yes | CVEs from Observed_Examples (empty array if none) |
| Hierarchy | object | No | Parent relationships (absent if no Related_Weaknesses) |
| References.Full_Details | object[] | No | Enriched external reference objects |
Example entry:
{
ID: "79",
Name: "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')",
Status: "Stable",
Description: "...",
CAPEC_IDs: ['63', '85', '209', '588', '591', '592'],
Known_CVEs: [
{ id: 'CVE-2021-1879', description: '...' }
],
Hierarchy: {
parents: ['74'],
relationships: [
{ nature: 'ChildOf', cweId: '74', viewId: '1000', ordinal: 'Primary' }
]
},
References: {
Reference: [{ External_Reference_ID: "REF-2" }],
Full_Details: [
{
Reference_ID: "REF-2",
Author: "OWASP",
Title: "Cross Site Scripting (XSS)",
URL: "https://www.owasp.org/..."
}
]
}
}
Note: Single references are automatically normalized to arrays and enriched just like multiple references. IDs are normalized to strings for consistency across all API surfaces.
MCP Server
Experimental: Alpha release. APIs may change.
An MCP server is available for using this library as tools in LLM agents like Claude Code, Codex, etc.:
npx fetch-cwe-list-mcp
See packages/fetch-cwe-list-mcp for full setup and usage.
License
MIT
Author
Related Skills
Agent-Reach
97.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
75.3kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.4kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Scrapling
87.3k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
