Generative AI Used to Produce Malicious JavaScript and Exploit Code
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.

Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
3 events from the most recent confirmed update back to the earliest known activity.
Unit 42 shares runtime-assembly findings with Cyber Threat Alliance members
Alongside its publication, Palo Alto Networks said it shared its findings on LLM-assisted runtime phishing JavaScript with Cyber Threat Alliance members. The disclosure framed the technique as an emerging threat and recommended browser-based behavioral defenses and tighter controls on unsanctioned LLM access.
Palo Alto Unit 42 documents PoC for LLM-generated phishing JavaScript at runtime
Palo Alto Networks Unit 42 published a proof of concept showing how a benign webpage can call trusted LLM services client-side to generate and assemble malicious JavaScript in real time, turning into a phishing page after load. The write-up says the technique can evade static and network-based detection by delivering no fixed payload and producing polymorphic variants.
Researcher tests LLMs against a QuickJS zero-day and generates working exploits
Security researcher Sean Heelan evaluated advanced language-model systems built on GPT-5.2 and Opus 4.5 against a previously unknown vulnerability in the QuickJS JavaScript interpreter. Across six configurations, the models produced more than 40 distinct working exploits, with GPT-5.2 solving all tested scenarios.
Related entities
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Sources
2 references tracked. Mallory keeps watching after this page renders.
The Next Frontier of Runtime Assembly Attacks: Leveraging LLMs to Generate Phishing JavaScript in Real Time
unit42.paloaltonetworks.com
Open sourceNew Study Shows GPT-5.2 Can Reliably Develop Zero-Day Exploits at Scale
cybersecuritynews.com
Open sourceSee the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.


