# 2s CWE Security Weakness Lookup

> 2s CWE Security Weakness Lookup is a paid API for AI agents from 2s.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Looks up or searches Common Weakness Enumeration (CWE) entries by ID or keyword from MITRE's authoritative database

## Facts

- Endpoint: GET https://2s.io/api/security/cwe?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-cwe-security-weakness-lookup-a9536f26
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GL97UUkYxcollmj6iHxWs

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-cwe-security-weakness-lookup-a9536f26
```

Example prompt: Look up CWE-79 for me and tell me its official name and abstraction level from the MITRE CWE database.

## When to prefer this

Use this endpoint when you need authoritative, structured CWE data from MITRE — including exact weakness names, abstraction levels, and canonical IDs — either by direct ID lookup or keyword search. Prefer this over CVE-focused endpoints when the concern is about weakness categories rather than specific vulnerabilities.

## Known failure modes

- Invalid or non-existent CWE ID returns empty items array with total 0
- Missing required input object returns validation error
- Network or payment failure returns non-ok response
- Overly broad keyword query returns large result sets that may need pagination via limit param

## How this service works

Authoritative MITRE CWE (Common Weakness Enumeration) lookup. Pass id (e.g. CWE-79, or just 79) for the canonical weakness — name, abstraction, description, extended description, ChildOf/ParentOf relationships (with names), and mapped CAPEC attack patterns (with names) — or query for a keyword search returning ranked matches. Bundled catalog (~970 weaknesses), zero external calls. Agents hallucinate CWE IDs and names constantly; this returns exact, citeable, version-pinned data. Pairs with security.cve (which returns CWE ids) and security.capec.

## Output

Returns a list of matching CWE items, each with an ID, full official name, and abstraction level (e.g. Base, Class, Variant), plus the total count and source attribution from MITRE CWE. Lookup mode returns exact match; keyword search returns multiple results.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "id": "79"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [],
     "properties": {
      "id": {
       "type": "string",
       "description": "CWE id (CWE-79 or 79)."
      },
      "limit": {
       "type": "integer"
      },
      "query": {
       "type": "string",
       "description": "Keyword search."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-cwe-security-weakness-lookup-a9536f26/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
