CWE
App · 12 actions
Look up software and hardware weaknesses in MITRE's Common Weakness Enumeration, the catalogue that security scanners, CVE records and coding standards use to name what went wrong (CWE-79 is cross-site scripting, CWE-89 SQL injection). Turn ids from a scan or a vulnerability report into names, search weaknesses by words or by the CVEs they cite, and read any weakness in full: its consequences, how to prevent and detect it, the platforms it affects, real examples and related attack patterns. Get the Top 25 and OWASP Top Ten lists, browse categories and views, and walk the hierarchy up and down to roll findings up into broader classes. Every action reads: nothing here changes anything. No account or API key required.
Actions
| Action | What it does |
|---|---|
| Get ancestors | Get everything above a weakness, category or view, up to the top of the view, each named with how many levels up it is, plus each route up written out (such as CWE-79 > CWE-74 > CWE-707 > CWE-1000). |
| Get category | Read one category: its summary, the view it belongs to, and every weakness it groups, each named. |
| Get children | Get the entries directly under a weakness, category or view in one view, in that view's order, each named: the more specific weaknesses under a weakness, the weaknesses in a category, or the top level of a view (a Top 25 in rank order). |
| Get descendants | Get everything below a weakness, category or view in one view, level by level, each named with how deep it is and what it sits under. |
| Get parents | Get the entries directly above a weakness, category or view: the more general weakness or the category it sits under, in one view or every view, each named and marked when it is the primary parent. |
| Get version | Get the version of the CWE catalogue MITRE is publishing, the day it was released, and how many weaknesses, categories and views it holds. |
| Get view | Read one view: what it is for, who it is for, and its members in the view's own order, each named. |
| Get weakness | Read one weakness in full: its description, how likely it is to be exploited, what an attacker can do through it, how to prevent it and find it, the languages and technologies it affects, the real vulnerabilities (CVE ids) it has caused, worked code examples, related weaknesses and attack patterns, and whether CWE wants it used to name a vulnerability's root cause. |
| List views | List every view, the ways CWE arranges its weaknesses for one audience or purpose: the yearly Top 25 lists, the OWASP Top Ten, the views for software developers, hardware designers and researchers, and the views for each coding standard. |
| Look up CWE entries | Turn one or more CWE ids, such as those in a scanner report or a CVE record, into their names, what each is (a weakness, a category or a view), how specific it is, its status and its description. |
| Search categories | Find categories, the groups CWE files weaknesses under, by words in their name or summary: an OWASP Top Ten entry such as 'A03:2021', a coding standard's rules, or a topic such as 'cryptographic'. |
| Search weaknesses | Find weaknesses by words in their name, other names or description (such as 'sql injection' or 'deserialization'), by a CVE id they list as an example, or by how general they are, how likely they are to be exploited, whether CWE wants them used for vulnerability mapping, and when they last changed. |
Get ancestors
Get everything above a weakness, category or view, up to the top of the view, each named with how many levels up it is, plus each route up written out (such as CWE-79 > CWE-74 > CWE-707 > CWE-1000). Use it to roll a specific weakness up to its broad class for reporting. No API key required.
Inputs
- CWE id
entrytextRequired - The weakness, category or view to start from, as 79, CWE-79 or cwe-79.
- View
viewtext - Which view's hierarchy to follow, such as Research Concepts or Software Development. Leave it empty to search every view, which also shows the lists the entry appears on, such as a Top 25.
- Primary route only
primary_onlytrue/false - Follow only each entry's primary parent, giving one route up per view instead of every route.Default:
false.
Outputs
ancestorslist- Every entry above it, up to and including the view at the top, each once per view, nearest first.
countnumber- How many ancestors there are.
entryobject- The entry this answer is about.
pathslist- Each route from the entry up to the top of a view.
primary_onlytrue/false- True when only the primary path up was followed.
view_idnumber- The view asked about, e.g. 1000. Empty when every view was searched.
view_nametext- That view's name. Empty when every view was searched.
Example output
{
"ancestors": [
{
"abstraction": "Class",
"cwe_id": "CWE-74",
"depth": 1,
"entry_type": "weakness",
"id": 74,
"name": "Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')",
"status": "Incomplete",
"url": "https://cwe.mitre.org/data/definitions/74.html",
"view_id": 1000,
"view_name": "Research Concepts"
},
{
"abstraction": "Pillar",
"cwe_id": "CWE-707",
"depth": 2,
"entry_type": "weakness",
"id": 707,
"name": "Improper Neutralization",
"status": "Incomplete",
"url": "https://cwe.mitre.org/data/definitions/707.html",
"view_id": 1000,
"view_name": "Research Concepts"
},
{
"abstraction": null,
"cwe_id": "CWE-1000",
"depth": 3,
"entry_type": "view",
"id": 1000,
"name": "Research Concepts",
"status": "Draft",
"url": "https://cwe.mitre.org/data/definitions/1000.html",
"view_id": 1000,
"view_name": "Research Concepts"
}
],
"count": 3,
"entry": {
"abstraction": "Base",
"cwe_id": "CWE-79",
"entry_type": "weakness",
"id": 79,
"name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')",
"status": "Stable",
"url": "https://cwe.mitre.org/data/definitions/79.html"
},
"paths": [
{
"ids": [
79,
74,
707,
1000
],
"text": "CWE-79 > CWE-74 > CWE-707 > CWE-1000",
"view_id": 1000
}
],
"primary_only": false,
"view_id": 1000,
"view_name": "Research Concepts"
}Get category
Read one category: its summary, the view it belongs to, and every weakness it groups, each named. Use it to list the weaknesses behind an OWASP Top Ten entry or a topic such as Numeric Errors. No API key required.
Inputs
- Category
categorytextRequired - The category to read. Pick it from the list, or give its id as 189, CWE-189 or cwe-189.
Outputs
cwe_idtext- The id as CWE writes it, e.g. 'CWE-79'.
idnumber- The entry's CWE number, e.g. 79.
member_countnumber- How many entries the category groups.
memberslist- The entries the category groups, in CWE's order.
nametext- The entry's name, e.g. 'Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')'.
noteslist- CWE's own notes on the entry.
statustext- How settled the entry is: 'Stable', 'Draft', 'Incomplete', 'Obsolete' or 'Deprecated'.
summarytext- What the category groups.
taxonomy_mappingslist- Where the entry appears in other catalogues and coding standards, such as the OWASP Top Ten or the SEI CERT coding standards.
urltext- The entry's page on cwe.mitre.org.
view_idnumber- The view the category belongs to, e.g. 1344 for the OWASP Top Ten 2021. Empty for a deprecated category.
view_nametext- That view's name, e.g. 'Research Concepts'.
Example output
{
"cwe_id": "CWE-1347",
"id": 1347,
"member_count": 2,
"members": [
{
"abstraction": "Class",
"cwe_id": "CWE-20",
"entry_type": "weakness",
"id": 20,
"name": "Improper Input Validation",
"status": "Stable",
"url": "https://cwe.mitre.org/data/definitions/20.html"
},
{
"abstraction": "Class",
"cwe_id": "CWE-74",
"entry_type": "weakness",
"id": 74,
"name": "Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')",
"status": "Incomplete",
"url": "https://cwe.mitre.org/data/definitions/74.html"
}
],
"name": "OWASP Top Ten 2021 Category A03:2021 - Injection",
"notes": [
{
"note": "As of CWE 4.6, the relationships in this category were pulled directly from the CWE mappings cited in the 2021 OWASP Top Ten.",
"note_type": "Maintenance"
}
],
"status": "Incomplete",
"summary": "Weaknesses in this category are related to the A03 category \"Injection\" in the OWASP Top Ten 2021.",
"taxonomy_mappings": [],
"url": "https://cwe.mitre.org/data/definitions/1347.html",
"view_id": 1344,
"view_name": "Weaknesses in OWASP Top Ten (2021)"
}Get children
Get the entries directly under a weakness, category or view in one view, in that view's order, each named: the more specific weaknesses under a weakness, the weaknesses in a category, or the top level of a view (a Top 25 in rank order). No API key required.
Inputs
- CWE id
entrytextRequired - The weakness, category or view to start from, as 79, CWE-79 or cwe-79.
- View
viewtext - Which view's hierarchy to follow, such as Research Concepts or Software Development. Leave it empty to use the entry's own view: a view's own hierarchy, the view a category belongs to, or Research Concepts for a weakness.
Outputs
childrenlist- The entries directly under it in that view, in the view's own order.
countnumber- How many children there are.
entryobject- The entry this answer is about.
view_idnumber- The CWE number of the view this answer is in, e.g. 1000.
view_nametext- That view's name, e.g. 'Research Concepts'.
Example output
{
"children": [
{
"abstraction": "Base",
"cwe_id": "CWE-79",
"entry_type": "weakness",
"id": 79,
"name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')",
"position": 1,
"status": "Stable",
"url": "https://cwe.mitre.org/data/definitions/79.html"
},
{
"abstraction": "Base",
"cwe_id": "CWE-89",
"entry_type": "weakness",
"id": 89,
"name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')",
"position": 2,
"status": "Stable",
"url": "https://cwe.mitre.org/data/definitions/89.html"
}
],
"count": 2,
"entry": {
"abstraction": null,
"cwe_id": "CWE-1435",
"entry_type": "view",
"id": 1435,
"name": "Weaknesses in the 2025 CWE Top 25 Most Dangerous Software Weaknesses",
"status": "Draft",
"url": "https://cwe.mitre.org/data/definitions/1435.html"
},
"view_id": 1435,
"view_name": "Weaknesses in the 2025 CWE Top 25 Most Dangerous Software Weaknesses"
}Get descendants
Get everything below a weakness, category or view in one view, level by level, each named with how deep it is and what it sits under. Use it to list every specific weakness that counts as, say, injection (CWE-74), or every weakness in a view. No API key required.
Inputs
- CWE id
entrytextRequired - The weakness, category or view to start from, as 79, CWE-79 or cwe-79.
- View
viewtext - Which view's hierarchy to follow, such as Research Concepts or Software Development. Leave it empty to use the entry's own view: a view's own hierarchy, the view a category belongs to, or Research Concepts for a weakness.
- Only these types
entry_typeslist - Return only entries of these types, such as Base and Variant weaknesses. Leave empty for everything below.One or more of:
pillar(Pillar weaknesses),class(Class weaknesses),base(Base weaknesses),variant(Variant weaknesses),compound(Compound weaknesses),category(Categories).
Outputs
countnumber- How many descendants are returned.
descendantslist- Every entry below it in that view, each once, level by level: its children first, then theirs.
entryobject- The entry this answer is about.
total_descendantsnumber- How many descendants there are before the entry types filter.
view_idnumber- The CWE number of the view this answer is in, e.g. 1000.
view_nametext- That view's name, e.g. 'Research Concepts'.
Example output
{
"count": 2,
"descendants": [
{
"abstraction": "Variant",
"cwe_id": "CWE-80",
"depth": 1,
"entry_type": "weakness",
"id": 80,
"name": "Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)",
"parent_ids": [
79
],
"status": "Incomplete",
"url": "https://cwe.mitre.org/data/definitions/80.html"
},
{
"abstraction": "Variant",
"cwe_id": "CWE-82",
"depth": 2,
"entry_type": "weakness",
"id": 82,
"name": "Improper Neutralization of Script in Attributes of IMG Tags in a Web Page",
"parent_ids": [
83
],
"status": "Incomplete",
"url": "https://cwe.mitre.org/data/definitions/82.html"
}
],
"entry": {
"abstraction": "Base",
"cwe_id": "CWE-79",
"entry_type": "weakness",
"id": 79,
"name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')",
"status": "Stable",
"url": "https://cwe.mitre.org/data/definitions/79.html"
},
"total_descendants": 8,
"view_id": 1000,
"view_name": "Research Concepts"
}Get parents
Get the entries directly above a weakness, category or view: the more general weakness or the category it sits under, in one view or every view, each named and marked when it is the primary parent. Searching every view also lists the views that include it directly, such as a Top 25. No API key required.
Inputs
- CWE id
entrytextRequired - The weakness, category or view to start from, as 79, CWE-79 or cwe-79.
- View
viewtext - Which view's hierarchy to follow, such as Research Concepts or Software Development. Leave it empty to search every view, which also shows the lists the entry appears on, such as a Top 25.
Outputs
countnumber- How many parents there are.
entryobject- The entry this answer is about.
parentslist- The entries directly above it: the weakness or category it sits under in each view, and, when every view was searched, the views that list it directly (such as a Top 25).
view_idnumber- The view asked about, e.g. 1000. Empty when every view was searched.
view_nametext- That view's name. Empty when every view was searched.
Example output
{
"count": 1,
"entry": {
"abstraction": "Base",
"cwe_id": "CWE-79",
"entry_type": "weakness",
"id": 79,
"name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')",
"status": "Stable",
"url": "https://cwe.mitre.org/data/definitions/79.html"
},
"parents": [
{
"abstraction": "Class",
"cwe_id": "CWE-74",
"entry_type": "weakness",
"id": 74,
"name": "Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')",
"primary": true,
"status": "Incomplete",
"url": "https://cwe.mitre.org/data/definitions/74.html",
"view_id": 1000,
"view_name": "Research Concepts"
}
],
"view_id": 1000,
"view_name": "Research Concepts"
}Get version
Get the version of the CWE catalogue MITRE is publishing, the day it was released, and how many weaknesses, categories and views it holds. Run it on a schedule to notice a new release. No API key required.
Inputs
None.
Outputs
category_countnumber- How many categories it holds.
release_datetext- The day that version was released, e.g. '2026-04-30'.
versiontext- The version of the catalogue CWE is serving, e.g. '4.20'.
view_countnumber- How many views it holds.
weakness_countnumber- How many weaknesses the catalogue holds.
Example output
{
"category_count": 422,
"release_date": "2026-04-30",
"version": "4.20",
"view_count": 59,
"weakness_count": 969
}Get view
Read one view: what it is for, who it is for, and its members in the view's own order, each named. Pick a Top 25 view to get the Top 25 in rank order. No API key required.
Inputs
- View
viewtextRequired - The view to read. Pick it from the list, or give its id as 1000, CWE-1000 or cwe-1000.
Outputs
audiencelist- Who the view is for, and how they use it.
cwe_idtext- The id as CWE writes it, e.g. 'CWE-79'.
idnumber- The entry's CWE number, e.g. 79.
member_countnumber- How many members are listed.
memberslist- The entries at the top of the view, in its own order: a Top 25 in rank order, a hierarchy's top level, or every entry a rule-based view selects.
nametext- The entry's name, e.g. 'Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')'.
noteslist- CWE's own notes on the entry.
objectivetext- What the view is for.
statustext- How settled the entry is: 'Stable', 'Draft', 'Incomplete', 'Obsolete' or 'Deprecated'.
urltext- The entry's page on cwe.mitre.org.
view_typetext- 'Graph' for a hierarchy, 'Explicit' for a plain list, or 'Implicit' for a view CWE defines by a rule, such as every weakness in C.
Example output
{
"audience": [
{
"audience_type": "Software Developers",
"description": "By following the CWE Top 25, developers are able to significantly reduce the number of weaknesses that occur in their software."
}
],
"cwe_id": "CWE-1435",
"id": 1435,
"member_count": 2,
"members": [
{
"abstraction": "Base",
"cwe_id": "CWE-79",
"entry_type": "weakness",
"id": 79,
"name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')",
"position": 1,
"status": "Stable",
"url": "https://cwe.mitre.org/data/definitions/79.html"
},
{
"abstraction": "Base",
"cwe_id": "CWE-89",
"entry_type": "weakness",
"id": 89,
"name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')",
"position": 2,
"status": "Stable",
"url": "https://cwe.mitre.org/data/definitions/89.html"
}
],
"name": "Weaknesses in the 2025 CWE Top 25 Most Dangerous Software Weaknesses",
"notes": [],
"objective": "CWE entries in this view are listed in the 2025 CWE Top 25 Most Dangerous Software Weaknesses.",
"status": "Draft",
"url": "https://cwe.mitre.org/data/definitions/1435.html",
"view_type": "Graph"
}Get weakness
Read one weakness in full: its description, how likely it is to be exploited, what an attacker can do through it, how to prevent it and find it, the languages and technologies it affects, the real vulnerabilities (CVE ids) it has caused, worked code examples, related weaknesses and attack patterns, and whether CWE wants it used to name a vulnerability's root cause. No API key required.
Inputs
- Weakness
weaknesstextRequired - The weakness to read. Pick it from the list, or give its id as 79, CWE-79 or cwe-79.
Outputs
abstractiontext- For a weakness, how general it is: 'Pillar' (the most general), 'Class', 'Base', 'Variant' (the most specific) or 'Compound' (several weaknesses that occur together). Empty for a category or a view.
affected_resourceslist- What the weakness affects, e.g. ['Memory', 'File or Directory'].
alternate_termslist- Other names the weakness goes by, such as 'XSS'.
applicable_platformslist- The languages, technologies, operating systems and architectures the weakness occurs in.
background_detailslist- Background a reader needs to follow the entry.
common_consequenceslist- What an attacker can do through the weakness.
cve_idslist- The CVE ids among the observed examples, on their own.
cwe_idtext- The id as CWE writes it, e.g. 'CWE-79'.
demonstrative_exampleslist- CWE's worked examples, each as text: the explanation, then each code sample under a line saying whether it shows the weakness, an attack or a fix, and in which language.
descriptiontext- What the weakness is, in a sentence or two.
detection_methodslist- Ways to find the weakness in a product.
diagram_urltext- A diagram of the weakness on cwe.mitre.org, when CWE has drawn one.
extended_descriptiontext- CWE's longer explanation, in paragraphs. Empty when there is none.
first_publishedtext- The day the entry was first published, e.g. '2006-07-19'.
functional_areaslist- Where in a product it occurs, e.g. ['Authentication'].
idnumber- The entry's CWE number, e.g. 79.
last_updatedtext- The day of the CWE release that last changed the entry, e.g. '2026-04-30'.
last_updated_in_versiontext- The CWE version that last changed it, e.g. '4.19'.
likelihood_of_exploittext- How likely CWE judges an attack on this weakness to be: 'High', 'Medium' or 'Low'. Empty for most weaknesses, which CWE has not rated.
mappingobject- CWE's guidance on using this weakness as the root cause of a reported vulnerability, as in a CVE record.
modes_of_introductionlist- When in a product's life the weakness gets in.
nametext- The entry's name, e.g. 'Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')'.
noteslist- CWE's own notes on the entry.
observed_exampleslist- Real vulnerabilities caused by the weakness.
ordinalitieslist- Whether the weakness is a root cause ('Primary'), the result of another weakness ('Resultant'), or 'Indirect'.
potential_mitigationslist- Ways to prevent or reduce the weakness.
referenceslist- The books, papers and pages CWE cites.
related_attack_patternslist- The CAPEC attack patterns that exploit the weakness (CAPEC is MITRE's catalogue of attacks).
related_weaknesseslist- Other weaknesses this one is related to, and how.
statustext- How settled the entry is: 'Stable', 'Draft', 'Incomplete', 'Obsolete' or 'Deprecated'.
structuretext- 'Simple' for one weakness, 'Composite' for several that must all be present, or 'Chain' for one that leads to the next.
taxonomy_mappingslist- Where the entry appears in other catalogues and coding standards, such as the OWASP Top Ten or the SEI CERT coding standards.
urltext- The entry's page on cwe.mitre.org.
Example output
{
"abstraction": "Base",
"affected_resources": [],
"alternate_terms": [
{
"description": "a common attack-oriented phrase",
"term": "SQL injection"
},
{
"description": "a common abbreviation for \"SQL injection\"",
"term": "SQLi"
}
],
"applicable_platforms": [
{
"name": "Not Language-Specific",
"platform_type": "Language",
"prevalence": "Undetermined"
},
{
"name": "SQL",
"platform_type": "Language",
"prevalence": "Often"
}
],
"background_details": [],
"common_consequences": [
{
"impacts": [
"Execute Unauthorized Code or Commands"
],
"likelihood": null,
"note": "Adversaries could execute system commands, typically by changing the SQL statement to redirect output to a file that can then be executed.",
"scopes": [
"Confidentiality",
"Integrity",
"Availability"
]
},
{
"impacts": [
"Read Application Data"
],
"likelihood": null,
"note": "Since SQL databases generally hold sensitive data, loss of confidentiality is a frequent problem with SQL injection vulnerabilities.",
"scopes": [
"Confidentiality"
]
}
],
"cve_ids": [
"CVE-2024-6847",
"CVE-2025-26794"
],
"cwe_id": "CWE-89",
"demonstrative_examples": [
{
"example_id": "DX-209",
"text": "The following code dynamically constructs and executes a SQL query that searches for items matching a specified name.\n\nExample of the weakness (C#):\n```\n\tstring query = \"SELECT * FROM items WHERE owner = '\" + userName + \"' AND itemname = '\" + ItemName.Text + \"'\";\n```"
}
],
"description": "The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.",
"detection_methods": [
{
"description": "This weakness can often be detected using automated static analysis tools. Many modern tools use data flow analysis or constraint-based techniques to minimize the number of false positives.",
"detection_id": "DM-1",
"effectiveness": null,
"effectiveness_notes": "This is not a perfect solution, since 100% accuracy and coverage are not feasible.",
"method": "Automated Static Analysis"
},
{
"description": "This weakness can be detected using dynamic tools and techniques that interact with the software using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection.",
"detection_id": "DM-2",
"effectiveness": "Moderate",
"effectiveness_notes": null,
"method": "Automated Dynamic Analysis"
}
],
"diagram_url": "https://cwe.mitre.org/data/images/CWE-89-Diagram.png",
"extended_description": null,
"first_published": "2006-07-19",
"functional_areas": [],
"id": 89,
"last_updated": "2025-12-11",
"last_updated_in_version": "4.19",
"likelihood_of_exploit": "High",
"mapping": {
"comments": "Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.",
"rationale": "This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.",
"reasons": [
"Acceptable-Use"
],
"suggestions": [],
"usage": "Allowed"
},
"modes_of_introduction": [
{
"note": "This weakness typically appears in data-rich applications that save user inputs in a database.",
"phase": "Implementation"
}
],
"name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')",
"notes": [
{
"note": "SQL injection can be resultant from special character mismanagement, MAID, or denylist/allowlist problems. It can be primary to authentication errors.",
"note_type": "Relationship"
}
],
"observed_examples": [
{
"description": "SQL injection in AI chatbot via a conversation message",
"reference": "CVE-2024-6847",
"url": "https://www.cve.org/CVERecord?id=CVE-2024-6847"
},
{
"description": "SQL injection in e-mail agent through SQLite integration",
"reference": "CVE-2025-26794",
"url": "https://www.cve.org/CVERecord?id=CVE-2025-26794"
}
],
"ordinalities": [
{
"description": null,
"ordinality": "Primary"
},
{
"description": null,
"ordinality": "Resultant"
}
],
"potential_mitigations": [
{
"description": "Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].",
"effectiveness": null,
"effectiveness_notes": null,
"mitigation_id": "MIT-4",
"phases": [
"Architecture and Design"
],
"strategy": "Libraries or Frameworks"
},
{
"description": "If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated.",
"effectiveness": null,
"effectiveness_notes": null,
"mitigation_id": "MIT-27",
"phases": [
"Architecture and Design"
],
"strategy": "Parameterization"
}
],
"references": [
{
"authors": [
"Michael Howard",
"David LeBlanc",
"John Viega"
],
"publication": "McGraw-Hill",
"reference_id": "REF-44",
"section": "\"Sin 1: SQL Injection.\" Page 3",
"title": "24 Deadly Sins of Software Security",
"url": null,
"year": "2010"
}
],
"related_attack_patterns": [
{
"capec_id": "CAPEC-108",
"id": 108,
"url": "https://capec.mitre.org/data/definitions/108.html"
},
{
"capec_id": "CAPEC-66",
"id": 66,
"url": "https://capec.mitre.org/data/definitions/66.html"
}
],
"related_weaknesses": [
{
"cwe_id": "CWE-943",
"id": 943,
"name": "Improper Neutralization of Special Elements in Data Query Logic",
"primary": true,
"relationship": "ChildOf",
"view_id": 1000
},
{
"cwe_id": "CWE-74",
"id": 74,
"name": "Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')",
"primary": true,
"relationship": "ChildOf",
"view_id": 1003
}
],
"status": "Stable",
"structure": "Simple",
"taxonomy_mappings": [
{
"entry_id": null,
"entry_name": "SQL injection",
"fit": null,
"taxonomy": "PLOVER"
},
{
"entry_id": "A2",
"entry_name": "Injection Flaws",
"fit": "CWE More Specific",
"taxonomy": "OWASP Top Ten 2007"
}
],
"url": "https://cwe.mitre.org/data/definitions/89.html"
}List views
List every view, the ways CWE arranges its weaknesses for one audience or purpose: the yearly Top 25 lists, the OWASP Top Ten, the views for software developers, hardware designers and researchers, and the views for each coding standard. No API key required.
Inputs
- Include deprecated entries
include_deprecatedtrue/false - Also return entries CWE has retired. Each names the entry that replaced it.Default:
false.
Outputs
countnumber- How many views are listed.
viewslist- Every view, by CWE number.
Example output
{
"count": 2,
"views": [
{
"cwe_id": "CWE-699",
"id": 699,
"name": "Software Development",
"objective": "This view organizes weaknesses around concepts that are frequently used or encountered in software development.",
"status": "Draft",
"url": "https://cwe.mitre.org/data/definitions/699.html",
"view_type": "Graph"
},
{
"cwe_id": "CWE-1000",
"id": 1000,
"name": "Research Concepts",
"objective": "This view is intended to facilitate research into weaknesses, including their inter-dependencies, and can be leveraged to systematically identify theoretical gaps within CWE.",
"status": "Draft",
"url": "https://cwe.mitre.org/data/definitions/1000.html",
"view_type": "Graph"
}
]
}Look up CWE entries
Turn one or more CWE ids, such as those in a scanner report or a CVE record, into their names, what each is (a weakness, a category or a view), how specific it is, its status and its description. Ids CWE does not have come back marked as not found rather than failing the step. No API key required.
Inputs
- CWE ids
idstextRequired - One or more ids, as 79, CWE-79 or cwe-79, separated by commas or spaces, or a list from an earlier step. Up to 500 at once.
Outputs
countnumber- How many ids were looked up.
entrieslist- One row per id asked for, in the order given.
found_countnumber- How many of them CWE has.
not_foundlist- The ids CWE does not have, e.g. ['CWE-99999'].
Example output
{
"count": 3,
"entries": [
{
"abstraction": "Base",
"cwe_id": "CWE-79",
"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.",
"entry_type": "weakness",
"found": true,
"id": 79,
"name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')",
"status": "Stable",
"url": "https://cwe.mitre.org/data/definitions/79.html"
},
{
"abstraction": null,
"cwe_id": "CWE-1347",
"description": "Weaknesses in this category are related to the A03 category \"Injection\" in the OWASP Top Ten 2021.",
"entry_type": "category",
"found": true,
"id": 1347,
"name": "OWASP Top Ten 2021 Category A03:2021 - Injection",
"status": "Incomplete",
"url": "https://cwe.mitre.org/data/definitions/1347.html"
},
{
"abstraction": null,
"cwe_id": "CWE-99999",
"description": null,
"entry_type": null,
"found": false,
"id": 99999,
"name": null,
"status": null,
"url": null
}
],
"found_count": 2,
"not_found": [
"CWE-99999"
]
}Search categories
Find categories, the groups CWE files weaknesses under, by words in their name or summary: an OWASP Top Ten entry such as 'A03:2021', a coding standard's rules, or a topic such as 'cryptographic'. Leave the words empty to list every category. No API key required.
Inputs
- Search for
querytext - Words that must all appear in the category's name or summary. Leave empty to match every category.
- Include deprecated entries
include_deprecatedtrue/false - Also return entries CWE has retired. Each names the entry that replaced it.Default:
false. - How many to return
limitnumber - The most categories to return. 500 returns every category in the catalogue.From 1 to 500. Default:
25.
Outputs
categorieslist- The matching categories: those named with the words first, then those whose summary has them, each group by CWE number.
countnumber- How many are returned.
more_availabletrue/false- True when more matched than the limit returned.
querytext- The words searched for. Empty when none were given.
total_matchingnumber- How many categories matched, before the limit.
Example output
{
"categories": [
{
"cwe_id": "CWE-1347",
"id": 1347,
"member_count": 32,
"name": "OWASP Top Ten 2021 Category A03:2021 - Injection",
"status": "Incomplete",
"summary": "Weaknesses in this category are related to the A03 category \"Injection\" in the OWASP Top Ten 2021.",
"url": "https://cwe.mitre.org/data/definitions/1347.html",
"view_id": 1344
}
],
"count": 1,
"more_available": false,
"query": "A03:2021",
"total_matching": 1
}Search weaknesses
Find weaknesses by words in their name, other names or description (such as 'sql injection' or 'deserialization'), by a CVE id they list as an example, or by how general they are, how likely they are to be exploited, whether CWE wants them used for vulnerability mapping, and when they last changed. Leave everything empty to list every weakness. No API key required.
Inputs
- Search for
querytext - Words that must all appear in the weakness's name, other names or description, or a CVE id such as CVE-2024-6847 to find the weaknesses that cite it. Leave empty to match every weakness.
- How general
abstractionslist - Only weaknesses at these levels. CWE recommends Base and Variant for naming the root cause of a vulnerability. Leave empty for every level.One or more of:
pillar(Pillar (the most general)),class,base,variant(Variant (the most specific)),compound(Compound (several weaknesses together)). - Likelihood of exploit
likelihood_of_exploitlist - Only weaknesses CWE rates this likely to be exploited. Most weaknesses are not rated, so any choice here leaves those out.One or more of:
high,medium,low. - Use for vulnerability mapping
mapping_usagelist - Only weaknesses CWE says may be (or may not be) named as the root cause of a reported vulnerability.One or more of:
allowed,allowed_with_review(Allowed with review),discouraged,prohibited. - Updated since
updated_sincedate - Only weaknesses changed by a CWE release on or after this day. Use the release date from 'Get CWE version' to list what the newest release changed.
- Include deprecated entries
include_deprecatedtrue/false - Also return entries CWE has retired. Each names the entry that replaced it.Default:
false. - How many to return
limitnumber - The most weaknesses to return. 1,000 returns every weakness in the catalogue.From 1 to 1000. Default:
25.
Outputs
countnumber- How many are returned.
more_availabletrue/false- True when more matched than the limit returned.
querytext- The words searched for. Empty when none were given.
total_matchingnumber- How many weaknesses matched, before the limit.
weaknesseslist- The matching weaknesses: those named with the words first, then those whose other names or description have them, each group by CWE number.
Example output
{
"count": 2,
"more_available": true,
"query": "sql injection",
"total_matching": 7,
"weaknesses": [
{
"abstraction": "Base",
"cwe_id": "CWE-89",
"description": "The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.",
"id": 89,
"last_updated": "2025-12-11",
"likelihood_of_exploit": "High",
"mapping_usage": "Allowed",
"name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')",
"status": "Stable",
"url": "https://cwe.mitre.org/data/definitions/89.html"
},
{
"abstraction": "Variant",
"cwe_id": "CWE-564",
"description": "Using Hibernate to execute a dynamic SQL statement built with user-controlled input can allow an attacker to modify the statement's meaning or to execute arbitrary SQL commands.",
"id": 564,
"last_updated": "2025-12-11",
"likelihood_of_exploit": null,
"mapping_usage": "Allowed",
"name": "SQL Injection: Hibernate",
"status": "Incomplete",
"url": "https://cwe.mitre.org/data/definitions/564.html"
}
]
}