ALIBI: Adaptive Agentic Attacks on LLM-Based Vulnerability Detectors via Adversarial Code Comments
The paper introduces ALIBI, an adaptive black-box attack framework that demonstrates how coding agents can strategically insert adversarial comments to evade LLM-based vulnerability detectors with over 90% success rates, revealing a critical security flaw where natural language context can override program evidence.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are hiring a super-smart robot detective to scan your code for security holes. This robot doesn't just look at the math of the program; it also reads the notes, comments, and explanations written by the human developers to understand why the code was written that way. It's like a detective who reads a suspect's diary to figure out if they are telling the truth. The idea is that this extra context helps the robot spot real dangers and ignore false alarms. But what happens if the suspect writes a fake diary entry saying, "I was definitely at home at the time," even though the security cameras show otherwise? This paper explores a corner of computer science called "adversarial attacks" on Artificial Intelligence. It asks a scary question: Can a bad actor trick these AI detectives by simply writing a clever lie in the comments, without actually changing the dangerous code itself? If the robot believes the lie, it might let a dangerous bug slip through, leaving your software wide open to hackers.
The researchers behind this study, Zixuan Wu and Cristina Nita-Rotaru, built a digital "villain" named ALIBI to test exactly this scenario. They wanted to see if they could trick modern AI vulnerability detectors by injecting fake, but very convincing, safety claims directly into the source code comments. Think of it like a master forger creating a fake "All Clear" stamp and sticking it right next to a ticking bomb. The AI, trained to trust human notes, sees the stamp and decides the bomb is actually a harmless toy.
The results were startling. The team tested ALIBI against four different state-of-the-art AI detectors, ranging from specialized models to complex systems where multiple AI agents debate the code. They used 125 real-world examples of a specific type of bug called a "null-pointer dereference" (a common coding mistake that can crash programs). The outcome? The AI detectives were incredibly gullible. In fact, the attack succeeded more than 90% of the time across all systems, and on one specific system, it worked 100% of the time. The AI would correctly spot the bug on a clean piece of code, but the moment a single, well-written comment claimed, "Don't worry, a special tool checked this and it's safe," the AI would immediately change its mind and declare the code safe, even though the dangerous bug was still right there, unchanged.
The paper also discovered that the style of the lie mattered a lot. The most successful tricks weren't just simple notes; they were elaborate stories that sounded like they came from authoritative sources. For instance, comments that claimed a "Frama-C" or "Coverity" tool had verified the code (even though these tools weren't actually run) were incredibly persuasive. The AI seemed to think, "If a fancy tool says it's safe, I must be wrong." The researchers found that simply writing a note saying "This is safe" wasn't enough; the AI needed the lie to be wrapped in a complex, step-by-step reasoning story or a fake report from a trusted external authority to be convinced.
However, the story doesn't end with the AI losing. The researchers also tested ways to stop this trickery. They found that simply telling the AI in its instructions, "Don't trust comments," didn't work very well; the AI still got confused by the fancy lies. But they did find two things that worked much better. First, if you separate the AI's job so it analyzes the code before it ever sees the comments, it becomes much harder to trick. Second, and most effectively, if you have a separate filter that strips out any comment that can't be proven by the code itself before the main AI sees it, the attack almost completely fails. In their tests, this "sanitization" method reduced the success rate of the attacks to less than 3%.
The paper concludes that while these AI detectors are powerful, they have a fundamental weakness: they trust human words too much, even when those words are lies. The researchers suggest that future security tools need to be designed with a healthy dose of skepticism, treating natural language comments as something to be verified rather than something to be believed. They didn't just find a bug; they found a whole new way to break these systems, proving that in the world of AI security, a well-placed lie can be just as dangerous as a broken line of code.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.