LLM-injected vulnerabilities felt more relevant but showed limited learning gains
Injecting CWEs into students' own code makes security examples more engaging yet does not significantly improve outcomes
People & policy arXiv 15 Apr 2026 Method Prototype evidence
Published as “Towards Personalizing Secure Programming Education with LLM-Injected Vulnerabilities”
Why it matters
Personalized vulnerability examples can lower student confusion, indicating a promising avenue to make secure programming education more accessible and engaging.
Summary
InjectEd’s personalized CWE injection reduced student-reported confusion (p< .05, r= 2.53, U= 832) compared to generic textbook examples, though most learning outcome measures showed no statistically significant differences (p> .05). The authors built an agentic AI system that uses LLMs (GPT-4o-mini) to edit student-authored code, inject CWE-aligned vulnerabilities, and output pedagogically formatted artifacts. The approach was evaluated in two undergraduate courses with 71 students, using a post-project survey against a baseline of generic security instructional materials. Evidence is limited to a single-session study with modest sample size, so the quantitative support is weak despite the qualitative enthusiasm.
What they found 1
- Statistically significant reduction in reported confusion for students receiving personalized injections
“The most notable quantitative result was a statistically significant reduction in reported confusion among InjectEd participants compared to the control group (p< .05, r= 2.53, U= 832), indicating a small to medium effect size.”
Caveats 5
- While none of the learning outcome measures (i.e., perceived understanding, confidence, or ability to recognize or fix CWEs) achieved statistical significance (p> .05)
- quantitative results did not yield widespread statistical significance
- the study included only 71 students across two undergraduate courses.
- variability in injection quality was observed across some examples.
- the primary external threat to validity lies in the limited generalizability of our findings
What’s new here 4
- Uses LLMs to inject CWE-aligned vulnerabilities directly into each student's own code
- Implements a modular agentic AI pipeline (Injector, Evaluator, Ranker, Learning Outcome Generator) for scalable educational content creation
- First deployment of agentic AI for personalized secure programming instruction in undergraduate CS courses
- Evaluates personalization impact via a controlled study comparing injected examples to generic textbook materials