Generative AI Used to Produce Malicious JavaScript and Exploit Code
Emerging Technology Risk · 2 sources · Updated 5mo ago · First seen Jan 22, 2026

New research highlights how large language models (LLMs) can be operationalized for offensive use, including generating malicious JavaScript and exploit code with limited human involvement. Unit 42 described an AI-augmented runtime assembly technique in which a seemingly benign webpage makes client-side API calls to trusted LLM services to obtain code fragments that are then assembled and executed in the victim’s browser, producing a personalized phishing experience. The approach is designed to be evasive by delivering content from trusted LLM domains, producing polymorphic code per visit, and deferring malicious behavior until runtime—reducing the effectiveness of static and network-only detections.
Separately, an experiment reported by CybersecurityNews described testing GPT-5.2- and Opus 4.5-based systems against a zero-day in the QuickJS JavaScript interpreter, resulting in 40+ distinct exploits across multiple configurations and protection scenarios. The report claims GPT-5.2 solved all presented challenges and that many exploit-generation runs completed in under an hour at relatively modest token costs, suggesting exploit development could increasingly scale with compute and budget rather than scarce expert labor. Together, the reports reinforce that LLMs can be used both for client-side phishing payload generation and for automated vulnerability exploitation, increasing the speed and variability of attacks defenders may face.
Why it matters
Impact assessment
This story affects enterprises that allow employee access to public LLM services, browser-based SaaS workflows, and organizations running software that embeds or depends on JavaScript interpreters such as QuickJS. The immediate risk is not a single disclosed CVE but a material increase in attacker speed, payload variability, and evasion, especially for phishing, credential theft, and exploit development.
The scope is broad because the techniques rely on trusted LLM domains, client-side runtime assembly, and commodity web delivery rather than niche infrastructure. The reporting describes proof-of-concept and research activity rather than confirmed mass exploitation in the wild, but it directly mirrors real phishing tradecraft such as LogoKit and demonstrates practical offensive scaling.
Supporting details
- Affected populations:
- Enterprise users browsing externally hosted pages
- Organizations permitting unsanctioned browser access to LLM APIs/services
- Security teams relying heavily on static web-content inspection or network-only detections
- Developers and vendors using QuickJS or similar embeddable JavaScript interpreters
- Business impact:
- Higher phishing success through personalized, dynamically generated lures
- Increased credential theft risk from browser-rendered phishing pages
- Reduced efficacy of URL/domain reputation and static payload scanning
- Faster exploit development cycles, lowering attacker cost and time-to-weaponization
- Scope and severity:
- Broad exposure for enterprises with unmanaged browser egress to LLM platforms
- Potentially targeted delivery because runtime-generated content can personalize per victim
- Operational disruption is indirect but meaningful through account compromise, follow-on intrusion, and incident response burden
- Exploitation status:
- No specific in-the-wild exploitation of the QuickJS zero-day is described
- Unit 42’s technique is a PoC, but it reproduces behaviors from the real-world LogoKit phishing campaign
- The article states 36% of malicious webpages detected daily by the authors already use runtime assembly behaviors, indicating the underlying delivery pattern is established


