Habr•August 18, 2026•🇷🇺Translated from Russian

Study Finds Iterative AI Code Generation Accumulates Security Vulnerabilities Over Multiple Iterations

A new study presented at IEEE-ISTAS 2025 demonstrates that iterative prompting of large language models for code generation causes progressive degradation of security properties.

Researchers began with 10 secure, vulnerability-free code samples written in C and Java. They then applied four distinct prompting strategies—adding features, optimizing performance, explicitly improving security, and using vague “make it better” requests—across 10 successive iterations, producing 400 code variants that were examined both manually and with automated scanners.

Key Findings on Vulnerability Accumulation

The number of vulnerabilities increased nonlinearly with each iteration. Prompts focused on adding functionality generated the highest total (158 vulnerabilities), while security-oriented prompts produced the lowest count (38). Nevertheless, even security-focused requests often replaced obvious flaws with more subtle ones.

A statistically significant positive correlation (r = 0.64) was observed between code complexity growth and vulnerability count. For every 10 % increase in complexity, researchers recorded an average 14.3 % rise in vulnerabilities.

Concrete Examples of Degradation

  • Memory-management functions evolved from safe allocation routines into complex pointer arithmetic containing buffer-overflow and use-after-free risks by iteration 10.
  • Authentication token checks acquired timing side-channels, parsing vulnerabilities, and flawed multi-factor recovery logic.
  • Database access routines lost parameterization, introduced dynamic string concatenation, and later added transaction support that created race conditions.

Although 27 % of early security-oriented iterations (iterations 1–3) produced genuine improvements such as added input validation and NULL checks, these gains were typically offset by new hidden vulnerabilities in later rounds.

Recommendations and Limitations

The authors conclude that human oversight after every iteration—or at minimum after no more than three iterations—is essential. They also advise increased reliance on static application security testing (SAST) tools whenever code volume grows substantially.

The study tested only GPT-4o and did not allow human corrections during the iterative process, leaving open questions about whether newer models exhibit the same pattern at later iteration counts.

Related articles

Habr•AI Security

AI Agent Workflow Exceeds 100-Unit ERP Limit Reaching 120 Due to Check-Then-Act Race Condition

A detailed case study demonstrates how an AI workflow authorized to order no more than 100 units of COMP-17 ended up creating 120 units across three suppliers. Each individual order of 40 units passed authorization checks returning ALLOW, yet the cumulative result violated the human-delegated mandate. The root cause was a classic check-then-act race condition where stateful permission tracking read the same initial balance concurrently before any updates occurred. Sequential stateful checks prevented the overrun, but concurrent execution allowed all three requests to read zero consumption and receive ALLOW. An improved design using PostgreSQL SELECT FOR UPDATE performs atomic reservation of the grant balance before calling the ERP system, ensuring only two orders succeed and the third is rejected with DENY_CAPACITY. The experiment used a deterministic planner without any LLM to isolate the authorization mechanism from model reasoning quality. Five key questions are provided for production deployments involving cumulative business limits delegated to agents.

AntiMalware•AI Security

SECURITM Launches MCP Server for External AI Access to Security Data

SECURITM has introduced an MCP server that connects external AI assistants directly to its platform data on assets, risks, tasks, and metrics. This marks the first such implementation among Russian SGRC and SOAR systems. The open MCP protocol enables natural language queries about critical assets without owners, overdue tasks, or monthly metric changes without manual data export. Supported tools include GigaChat, Yandex solutions, Claude, ChatGPT, Cursor, and compatible local models. Access remains strictly read-only through dedicated tokens with optional IP restrictions. The feature is available in paid cloud and on-premise editions and complements the platform’s built-in AI assistant.

Habr•AI Security

One Year Left to Secure Systems as Open-Source GLM-5.3-Flash Enables Automated Cyber Attacks

Chinese company Z.ai Co. released GLM-5.3-Flash in August 2026, an open-weight model that achieves 84.5% on CyberGym and 54.4% on ExploitBench, matching or exceeding leading commercial LLMs in vulnerability discovery and exploitation tasks. The model runs locally on consumer hardware such as a single Nvidia DGX Spark or Apple M5 Mac Studio with 256 GB unified memory, allowing unrestricted use after abliterated versions remove safety alignments. Experts warn that LLM agents could soon scan and exploit zero-days across Windows, Linux, browsers, and messaging apps around the clock. Initiatives Project Glasswing (Anthropic-led) and Daybreak (OpenAI-led) are racing to patch critical vulnerabilities in open-source projects and critical infrastructure before the next generation of unrestricted models arrives. Organizations are advised to accelerate patch deployment, inventory supply chains, and adopt advanced LLMs defensively within the remaining one-year window.

Habr•AI Security

RFC 9421 and Open wbauth Protocol Accelerate AI Agents 5.5x by Replacing Anti-Detect Browsers with Cryptographic Signatures

A new open implementation of the IETF RFC 9421 HTTP Message Signatures standard called wbauth allows AI agents to authenticate using Ed25519 cryptographic signatures instead of resource-heavy anti-detect browser farms. The approach eliminates the need for Camoufox, Playwright, or AdsPower instances that consume 500 MB to 1.5 GB of RAM per process and require residential proxy pools. Benchmarks show cold start time dropping from 1744 ms to 5 ms, request time from 86.8 ms to 15.8 ms, and memory usage from 500 MB to 0.76 MB. The system uses three HTTP headers for signing and verification against a public key directory hosted on Cloudflare Workers and D1. Server-side validation at the WAF or edge involves fetching the public key, canonicalizing the message per RFC 9421, verifying the Ed25519 signature, and checking timestamps to prevent replay attacks. The npm package wb-auth@0.4.0 and PyPI package wbauth-sdk==0.4.0 provide ready-to-use signers for Node, Bun, Deno, Python httpx, and requests. The full source is available on GitHub under the MrKoriy/wbauth repository.