Best practices for writing AI extensions - Port Swigger
Summary: PortSwigger published best practices for developers building AI-powered Burp Suite extensions through the Montoya API, requiring extensions to declare AI support via the enhancedCapabilities() method and check availability with ai.isEnabled(). The guidance calls for treating raw AI model output as untrusted and escaping it before display, using structured formats like JSON instead of free-text input to prevent prompt injection, and running AI calls asynchronously so slow requests don't lock the Swing thread and freeze Burp's interface.
Bottom line: The article's own warning is that higher temperature values may make security-related AI responses unreliable, and that AI calls can fail on insufficient credits or service downtime - so an extension that skips the try-catch block or ships unescaped model output hands attackers a path straight into the tool a tester is using to find flaws.
Read the original at PortSwigger Research ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026