← All insights

Benchmark · Security · Text classification

Can a model suggest the CWE for a new CVE? We measured it on 10,000 later CVEs

Two StayCharted models tested on 10,000 later CVEs: 81.4% and 83.4% accuracy. Compare CWE results, confidence and projected human-review workload.

By StayCharted · Published · Updated

Why test CVE-to-CWE mapping?

Since April 2026, the National Vulnerability Database adds its own analysis, including the weakness type (CWE), mainly to prioritized CVEs. A record may already contain a mapping from the organization that assigned the CVE (the CNA) or another contributor. This benchmark uses CNA-provided mappings. Of the 27,940 CVEs published from October 2025 to March 2026, 21.2% had no CWE from their CNA.

So we asked a practical question: if you train a model on CVEs that already have a CWE, how well does it suggest one for CVEs published later?

A CVE identifies a specific vulnerability; a CWE describes the type of weakness behind it. This benchmark tests category suggestions, not vulnerability detection, exploitability or remediation.

The short version

  • Both models beat the majority-category baseline. On 10,000 later CVEs, choosing among the 2025 CWE Top 25 and "Other", the AI Classifier Model was right on 81.4% and the Dedicated AI Model on 83.4%. Always answering "Other", the most common category, would be right 33.4% of the time.
  • The Dedicated model found more of the Top 25: 81.7% of CVEs whose CWE is on the list, against 75.5%. The AI Classifier played it safe and filed more of them as "Other".
  • The surest answers are very reliable. The AI Classifier was right on 95.0% of the 61.9% it was surest about (confidence 0.9 or higher). The Dedicated model was right on 93.2% of the 77.9% it was surest about.
  • Projected review workload is lower for the Dedicated model. Reviewing the least confident answers and correcting every reviewed error would reach 95% accuracy after checking 22.6% of CVEs, against 29.7% for the AI Classifier. This is a calculation, not measured analyst performance.
  • Clear weaknesses are easy, broad ones are hard. Cross-site scripting: 96.7% and 97.6%. Incorrect authorization (CWE-863): 22.7% and 38.9%. Classic buffer overflow (CWE-120): 12.3% and 28.1%.
  • Accuracy varies over time. Both models were around 85% on CVEs published in October 2025 and lower by March 2026 (76.8% and 79.2%). Test later CVEs regularly and evaluate retraining with recent corrections.

The test

Data: the CVE List published by the CVE Program (the cvelistV5 release of 28 November 2026). We used the CWE in each record's CNA section, not NVD's analysis.

Which CVEs:

  • Published, with exactly one CWE from the CNA and an English description of at least 20 words.
  • Left out: CVEs with no CWE, with several CWEs, or with a short description.

Categories: the 25 weaknesses on MITRE's 2025 CWE Top 25, plus "Other" for every other CWE. That's 26 answers, and "Other" covers 367 different CWEs in the test set.

Split by date, not at random:

Published CVEs
Training July 2024 to September 2025 (the newest 30,000 of 42,754 eligible) 28,795 after AMT's data check
Test October 2025 to March 2026 (a random 10,000 of 17,450 eligible) 10,000, never seen in training

A random split can put CVEs from the same product and month in both sets and make evaluation less representative of later records. Splitting by date is what a security team actually faces: new CVEs, after training.

Models: both read the description only and were trained on the same rows.

  • AI Classifier Model: a small pre-trained model reads meaning and a classifier learns the categories, on CPU. Training took about an hour; filling the 10,000 test CVEs took 24 minutes. On every plan.
  • Dedicated AI Model: an open-weight language model (Qwen3.5-4B) fine-tuned on the training CVEs, on a GPU. Training took about 9 hours 40 minutes; the fill took 22 minutes. On Business.

How often the AI Classifier was right

Accuracy
All 10,000 test CVEs 81.4%
Always answer "Other" 33.4%
CVEs whose true CWE is in the Top 25 (6,658) 75.5%
CVEs whose true CWE is "Other" (3,342) 93.1%

By weakness (recall: of the CVEs with this CWE, the share it got right; precision: of its answers with this CWE, the share that were right):

CWE Weakness Test CVEs Recall Precision
CWE-79 Cross-site scripting 1,808 96.7% 97.2%
CWE-89 SQL injection 503 94.8% 97.7%
CWE-352 Cross-site request forgery 329 89.1% 96.7%
CWE-502 Deserialization of untrusted data 199 83.9% 98.8%
CWE-862 Missing authorization 914 82.6% 92.9%
CWE-416 Use after free 101 82.2% 94.3%
CWE-918 Server-side request forgery 200 82.0% 95.9%
CWE-434 Unrestricted file upload 153 81.7% 89.3%
CWE-125 Out-of-bounds read 129 76.0% 87.5%
CWE-78 OS command injection 240 74.2% 74.2%
CWE-476 NULL pointer dereference 90 68.9% 98.4%
CWE-122 Heap-based buffer overflow 98 68.4% 73.6%
CWE-22 Path traversal 329 65.0% 84.6%
CWE-121 Stack-based buffer overflow 133 63.2% 72.4%
CWE-639 Authorization bypass through user-controlled key 179 54.7% 84.5%
CWE-94 Code injection 130 49.2% 70.3%
CWE-787 Out-of-bounds write 197 45.7% 73.2%
CWE-20 Improper input validation 131 34.4% 64.3%
CWE-200 Exposure of sensitive information 148 31.1% 56.8%
CWE-770 Allocation of resources without limits 122 30.3% 72.5%
CWE-306 Missing authentication for critical function 148 29.7% 86.3%
CWE-77 Command injection 61 27.9% 70.8%
CWE-284 Improper access control 74 27.0% 50.0%
CWE-863 Incorrect authorization 185 22.7% 66.7%
CWE-120 Classic buffer overflow 57 12.3% 38.9%
Other Any other CWE 3,342 93.1% 70.3%

Why the bottom of the table is hard (for both models):

  • Broad weaknesses. CWE-20, CWE-284 and CWE-200 describe a family of problems. CNAs use them for very different bugs, so their descriptions don't share wording.
  • Neighbors. Incorrect authorization (CWE-863) reads much like missing authorization (CWE-862). Command injection (CWE-77) reads like OS command injection (CWE-78). A classic buffer overflow (CWE-120) reads like a stack or heap overflow (CWE-121, CWE-122).
  • "Other" pulls hard. It's about a third of the test data and covers hundreds of CWEs, so when a description is vague the model often answers "Other". That's why "Other" has high recall and lower precision.

AI Classifier vs Dedicated AI Model

StayChartedAI Model Trainer · model comparison
StayCharted AI Classifier Model Dedicated AI Model
All 10,000 test CVEs 81.4% 83.4%
CVEs whose true CWE is in the Top 25 (6,658) 75.5% 81.7%
CVEs whose true CWE is "Other" (3,342) 93.1% 86.8%
Mistakes 1,862 1,659
...of which a Top 25 CWE filed as "Other" 1,314 630
...of which two Top 25 CWEs confused 319 588

Where the Dedicated model helped most (recall on the test CVEs):

StayChartedAI Model Trainer · model comparison
CWE Weakness StayCharted AI Classifier Model Dedicated AI Model
CWE-94 Code injection 49.2% 71.5%
CWE-770 Allocation without limits 30.3% 49.2%
CWE-200 Exposure of sensitive information 31.1% 48.6%
CWE-125 Out-of-bounds read 76.0% 93.0%
CWE-77 Command injection 27.9% 44.3%
CWE-863 Incorrect authorization 22.7% 38.9%
CWE-639 Authorization bypass via user-controlled key 54.7% 70.9%
CWE-120 Classic buffer overflow 12.3% 28.1%
CWE-306 Missing authentication 29.7% 41.9%
CWE-22 Path traversal 65.0% 74.8%

The trade-off: the AI Classifier leans on "Other" when unsure, which correctly groups more true “Other” cases but misses Top 25 weaknesses. The Dedicated model finds more of the Top 25 and makes more mistakes between neighboring categories instead. Its precision on the broad categories is low (CWE-120: 18.6%, CWE-284: 38.5%), so those answers deserve a check.

When the two models agree (85.3% of test CVEs), they're right 90.2% of the time.

How often the surest answers are right

Every answer comes with a confidence. These are measured results on subsets of the held-out test set; confident answers can still be wrong:

Confidence at least AI Classifier: share AI Classifier: accuracy Dedicated: share Dedicated: accuracy
0.95 51.2% 97.1% 71.6% 94.9%
0.9 61.9% 95.0% 77.9% 93.2%
0.8 73.5% 91.9% 84.3% 91.0%
0.7 80.7% 89.4% 88.8% 89.1%
0.5 92.3% 84.8% 95.9% 85.9%

The two models use confidence differently: the Dedicated model is sure more often, and a little less accurate at the same confidence. So compare them by how much review they need, below, not by the cutoff number.

Projected review workload — assuming perfect corrections. A person checks the least sure answers first and corrects every mistake they find. The share of CVEs they need to check to reach each level of delivered accuracy:

Projected accuracy after perfect review AI Classifier: share reviewed Dedicated: share reviewed
90% 15.7% 10.7%
95% 29.7% 22.6%
97% 38.8% 32.3%
98% 44.5% 42.9%

On 10,000 CVEs a month, reaching 95% means checking about 2,970 with the AI Classifier or about 2,260 with the Dedicated model. These are retrospective calculations on this test set. Actual review time and accuracy depend on reviewer errors, tied confidence scores and future data. Choose and validate each model’s review cutoff on your own examples.

Accuracy drifts as CVEs get newer

Published Test CVEs AI Classifier Dedicated
October 2025 1,291 85.1% 85.2%
November 2025 1,056 80.8% 86.6%
December 2025 1,736 85.4% 86.0%
January 2026 1,673 82.9% 84.5%
February 2026 1,795 80.1% 82.5%
March 2026 2,449 76.8% 79.2%

New products, new CNAs and new writing habits arrive every month. Monthly results fluctuated, with both models lower in March than October. This test does not prove a steady decline or isolate its cause. Add approved corrections and evaluate later records before publishing a retrained version. How review and retraining work →

We also saw this with older CVE IDs published late. 1,003 test CVEs had IDs from 2024 or earlier but were published in the test period; the models were right on 74.4% and 73.9% of them, against 82.2% and 84.5% for 2025 and 2026 IDs.

What this means for a security team

  • Use confidence to plan review. At 0.9, 61.9% of this test set had 95.0% agreement with CNA labels. Check uncertain answers and sample confident ones. Known exploited and critical findings must still go to a person regardless of confidence.
  • Pick the model by what you report on. If you need to catch the Top 25, the Dedicated model finds more of them and has a lower projected review share under the perfect-correction assumption. If recall of true “Other” cases matters more, or you're not on Business, the AI Classifier does well.
  • Check the broad categories. Answers of CWE-20, CWE-120, CWE-200 or CWE-284 are often wrong with either model.
  • Review recent examples regularly. Feed approved corrections into retraining and compare the next version on later CVEs.
  • Use your own categories if you have them. If your team groups weaknesses its own way, train on that instead; the method is the same.

Vulnerability triage with StayCharted → · How to map CVEs to CWE with machine learning →

Nothing is dismissed automatically. StayCharted does not scan, detect or patch vulnerabilities. CWE mapping does not approve risk acceptance or closing a finding. Update examples when your policy changes.

What these results do and don't show

  • The labels are the CNAs' own. Some CNAs pick a broad parent CWE where a more specific one fits, and the model learns their habits, including their mistakes. "Right" here means "agrees with the CNA".
  • One CWE per CVE. We left out CVEs with several CWEs (12.5% of the test period).
  • Descriptions only. No code, patches, advisories or references were read.
  • One run of each model, one six-month test period. Small differences aren't rankings.
  • Delivered accuracy assumes every reviewed mistake is corrected. Real reviewers miss some.
  • Missing-CWE cases were not scored. This test uses records with a CNA label. It does not establish accuracy on unlabeled records.

Method notes

  • Source: CVE List, cvelistV5 release 2026-11-28_all_CVEs_at_midnight. CWE taken from containers.cna.problemTypes.
  • Eligible: published (not rejected) records, exactly one CWE, English description of 20 or more words.
  • Training: the newest 30,000 eligible CVEs published 1 January 2024 to 30 September 2025, which turned out to span 26 July 2024 to 30 September 2025. After AMT's data check, which set aside duplicate and unusable rows including 14 near-duplicates, 28,795 remained. AMT's own check held back the newest 4,319: the AI Classifier scored 86.2% and the Dedicated AI Model 88.2% on that internal check.
  • Test: a random 10,000 (fixed seed) of the 17,450 eligible CVEs published 1 October 2025 to 31 March 2026, filled once through a normal AMT fill.
  • Personal information flags: AMT flagged 798 training rows, mostly version numbers that look like IP addresses or phone numbers. We kept them unmasked, since CVE records are public.
  • Categories: the 2025 CWE Top 25 (MITRE, December 2025) plus "Other".

Sources and attribution

CVE material: Copyright © 1999–2026, The MITRE Corporation. CVE is a trademark of The MITRE Corporation.

CVE usage license: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE™). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy.

CWE material: Copyright © 2006–2026, The MITRE Corporation. CWE is a trademark of The MITRE Corporation. Weakness names in the table are shortened for readability.

CWE usage license: CWE™ is free to use by any organization or individual for any research, development, and/or commercial purposes, per these CWE Terms of Use. Accordingly, The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. Any copy you make for such purposes is authorized on the condition that you reproduce MITRE’s copyright designation and this license in any such copy. CWE is a trademark of The MITRE Corporation.

CVE and CWE materials are provided “as is”, without warranties; see the linked terms for the full disclaimers. This benchmark is StayCharted’s independent evaluation, not an endorsement by MITRE, the CVE Program or NIST.

Frequently asked questions

Can AI assign CWE IDs to CVEs?

It can suggest them. On 10,000 CVEs published after their training data, our two models matched the CNA's CWE 81.4% and 83.4% of the time across the Top 25 and "Other". On the answers they were surest about, they were right about 93 to 95% of the time.

Which CWEs are hardest to classify automatically?

Broad weaknesses and close neighbors: incorrect authorization (CWE-863), improper access control (CWE-284), improper input validation (CWE-20), command injection (CWE-77) and classic buffer overflow (CWE-120). The AI Classifier found under 35% of each; the Dedicated model did better on all five but still under 45%.

Why does accuracy fall over time?

Monthly accuracy fluctuated. Both models were about 85% on October CVEs, and 76.8% and 79.2% on March CVEs. New products and labeling practices can change the input mix, but this test did not isolate causes or measure retraining improvements.

Is a fine-tuned language model worth it for CWE classification?

On this test, StayCharted’s Dedicated AI Model was 2 percentage points more accurate overall and 6.2 points better on Top 25 cases. Its projected review share to reach 95% was 22.6%, compared with 29.7%, assuming every reviewed mistake is corrected. It took about 9 hours 40 minutes to train on a GPU versus about an hour on CPU for the AI Classifier.

Would training on our own mappings do better?

It may, but this test does not measure that. Train on your own consistent mappings and evaluate on later records from your environment.

Does this replace NVD analysis?

No. Treat a suggested CWE as your team's working classification until the CNA or NVD provides one.

Put the findings into practice

Apply vulnerability triage to your findings →

Map CVEs to CWE with your own model →

Compare plans →

Explore more Insights

Compare AMT’s design decisions and training reports →

STAYCHARTED AI MODEL TRAINER

Train AI to categorize the way your team does.

Start with examples you already have, see how often it’s right on items it never saw, and use confidence to prioritize the ones a person should review.

Try it on your own data