Executive brief
InfCode, an AI-powered programming assistant, contains a security flaw in how it handles automated terminal commands. An attacker can trick the system by providing a specially crafted file that, when opened by a developer, automatically executes malicious commands on their computer without any warning. This could allow an attacker to steal sensitive company data or take full control of a developer's workstation.
Technical details
InfCode (up to v1.3.1) suffers from an OS command injection vulnerability (CWE-78) within its terminal auto-execution module. The security mechanism relies on a static blacklist that fails to include high-risk native Windows commands like 'powershell' and lacks dynamic semantic parsing. Consequently, the parser cannot identify malicious intent hidden through string concatenation, variable assignment, or double-quote interpolation. An attacker can exploit this by crafting a file with obfuscated instructions; when a user imports or views this file in the IDE, the InfCode Agent executes the commands with the user's privileges without requiring confirmation.
Affected products
- Tokfinity InfCode <= 1.3.1
Timeline
- 2026-03-27: disclosed: Vulnerability reported on GitHub by Secsys-FDU
- 2026-03-31: advisory: CVE-2026-30309 published