$npx skillfedfor your agent

cwe2

cwe2 is a CWE common weakness enumeration library for Python

With conditionsPyPI Software DevelopmentReleased Jul 202478.9K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — cwe2-3.0.0-py3-none-any.whl
v3.0.0 · released 2024-07-24 · Python >=3.7 · 1 runtime deps: importlib-resources

Yes, if you need to programmatically look up CWE weakness data in a Python application. The package is stable, has no known vulnerabilities, and low install friction. The main caveat is dormant maintenance—the vendored CWE data may lag behind MITRE's official updates, so verify the data freshness suits your use case before relying on it for critical security decisions.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with a single lightweight dependency (importlib-resources).
  • Maintenance is dormant—last commit was 2024-08-29 and no releases in over a year, though the repository remains active and the package is marked Production/Stable.

License · maintenance · safety

permissive license (permissive) — Dual-licensed under MIT and LicenseRef-scancode-cwe-tou. The CWE data itself carries MITRE's terms of use; permissive for code but you must respect MITRE's CWE usage terms when distributing or relying on the weakness data.

last release 2024-07-24 (751 days) · last repo commit 2024-08-29 · 15 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 78,876 downloads/mo, #14,400 on PyPI

Verify before relying

pip install cwe2

from cwe2.database import Database
db = Database()
weakness = db.get(15)
print(weakness.description)
  • Whether the vendored CWE data is kept current with MITRE's official CWE updates, given the dormant maintenance status.
  • Performance characteristics when querying large numbers of weaknesses or iterating the full database.
Same gist for agents: .md · .json

What it is and what it does

cwe2 is a Python wrapper around the Common Weakness Enumeration (CWE) database maintained by MITRE. It bundles a vendored copy of the CWE data and exposes it through a simple query interface, letting you fetch weakness records by ID and access their structured attributes—name, description, related weaknesses, mitigation strategies, and more. The package is useful for security tools, vulnerability scanners, and code analysis systems that need to resolve CWE IDs to human-readable weakness information.

The library requires Python 3.7 or later and has minimal dependencies. It provides convenience methods to retrieve curated subsets like the top 25 CWEs, OWASP top ten 2021 weaknesses, and those used by the National Vulnerability Database (NVD). Maintenance is dormant but the package is stable and carries no known security vulnerabilities.

Use it for

  • Resolve CWE IDs in vulnerability reports to fetch full weakness descriptions and mitigation guidance.
  • Build security dashboards or scanners that need to display MITRE CWE metadata alongside CVE findings.
  • Analyze code or dependencies and map detected weakness categories to their MITRE definitions for compliance reporting.
  • Query curated CWE lists like top 25 or OWASP top ten 2021 for security training or policy enforcement.
  • Enrich vulnerability data pipelines with standardized CWE weakness context and related attack patterns.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to programmatically look up CWE weakness data in a Python application.

The package is stable, has no known vulnerabilities, and low install friction. The main caveat is dormant maintenance—the vendored CWE data may lag behind MITRE's official updates, so verify the data freshness suits your use case before relying on it for critical security decisions.

Install

cwe2 on PyPI

Before you install

Low install friction with a single lightweight dependency (importlib-resources). Maintenance is dormant—last commit was 2024-08-29 and no releases in over a year, though the repository remains active and the package is marked Production/Stable.

License in practice

Dual-licensed under MIT and LicenseRef-scancode-cwe-tou. The CWE data itself carries MITRE's terms of use; permissive for code but you must respect MITRE's CWE usage terms when distributing or relying on the weakness data.

Quickstart

pip install cwe2

from cwe2.database import Database
db = Database()
weakness = db.get(15)
print(weakness.description)

Verify before relying

  • Whether the vendored CWE data is kept current with MITRE's official CWE updates, given the dormant maintenance status.
  • Performance characteristics when querying large numbers of weaknesses or iterating the full database.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
importlib-resources
MaintenanceDormant 751 days since the last release
Last repo commit
First released
Downloads78,876 / month, #14,400 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Software DevelopmentTopic :: Utilities

Evidence: cwe2-3.0.0-py3-none-any.whl

Tags

Capabilities
CWE lookup librarycommon weakness enumeration databasevulnerability weakness categoriesCWE ID resolversecurity weakness referenceMITRE CWE data accessCVE weakness mapping
Topics
vulnerability-referencesecurity-metadata
PyPI keywords
utilitiesCWEweaknessCVEvulnerabilities

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “CWE lookup library”

  • cwe2cwe2 provides programmatic access to the Common Weakness Enumeration…
  • libsastlibsast is a static application security testing library that scans…
  • geoip2fastGeoIP2Fast performs fast geolocation lookups for IPv4 and IPv6…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also nvdlib · cpe · flawfinder · safety · debsecan-mcp · pip-audit · csaf-tool · amulet-leveldb · cloudsec-audit · spake2