{"uid":"cap_GL97UUkYxcollmj6iHxWs","slug":"2s-cwe-security-weakness-lookup-a9536f26","name":"2s CWE Security Weakness Lookup","description":"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.","url":"https://2s.io/api/security/cwe?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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."}}}}}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"id":"79"}}},"response":{"data":{"ok":true,"items":[{"item":{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","status":"Stable","extended":"There are many variants of cross-site scripting, characterized by a variety of terms or involving different attack topologies. However, they all indicate the same fundamental weakness: improper neutralization of dangerous input between the adversary and a victim.","abstraction":"Base","description":"The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.","mappedCapec":[{"name":"XSS Using MIME Type Mismatch","capec":"CAPEC-209"},{"name":"DOM-Based XSS","capec":"CAPEC-588"},{"name":"Reflected XSS","capec":"CAPEC-591"},{"name":"Stored XSS","capec":"CAPEC-592"},{"name":"Cross-Site Scripting (XSS)","capec":"CAPEC-63"},{"name":"AJAX Footprinting","capec":"CAPEC-85"}],"relationships":[{"cwe":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')","nature":"ChildOf"},{"cwe":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')","nature":"ChildOf"},{"cwe":"CWE-494","name":"Download of Code Without Integrity Check","nature":"CanPrecede"},{"cwe":"CWE-352","name":"Cross-Site Request Forgery (CSRF)","nature":"PeerOf"}]},"mode":"lookup","source":{"url":"https://cwe.mitre.org/","license":"Free use with attribution (MITRE).","provider":"MITRE CWE — Common Weakness Enumeration"}}],"total":1,"source":{"url":"https://cwe.mitre.org/","license":"Free use with attribution (MITRE).","provider":"MITRE CWE — Common Weakness Enumeration"}},"meta":{"cost":{"usd":0.001,"tier":0},"caller":"x402","version":null,"endpoint":"security.cwe","settlement":{"txHash":"0x1a2f01b7254093d79e6e25e12e97c4d3cc1ec469a8a25e42292bbb0ef124b1f8","network":"eip155:8453","success":true}}}},"exampleRequest":{"id":"79"},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_7qS85XXAIm0__FHSek4zY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Looks up or searches Common Weakness Enumeration (CWE) entries by ID or keyword from MITRE's authoritative database","exampleAgentPrompt":"Look up CWE-79 for me and tell me its official name and abstraction level from the MITRE CWE database.","exampleUseCases":null,"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:48:51.611Z","isFirstParty":false,"canonicalSlug":"2s-cwe-security-weakness-lookup-a9536f26"}