Skip to content
Tutorial emka
Menu
  • Home
  • Debian Linux
  • Ubuntu Linux
  • Red Hat Linux
Menu

AI Bug Hunting with Semgrep

Posted on March 15, 2026

Have you ever wondered how experts find secret “trapdoors” in the apps you use every day? It is not just about typing fast like in the movies. Today, we are going to look at how modern tools, especially Artificial Intelligence, help security researchers find dangerous flaws in famous software like Google’s Gemini and VirtualBox.

Today’s technology allows us to analyze millions of lines of code in seconds, which was impossible just a decade ago. Imagine having a digital detective that never sleeps, pointing out exactly where a programmer made a mistake. In this tutorial, we will explore two major security flaws discovered by Vladimir Tokarev and learn how AI played a starring role in the process.

Let us begin with the first discovery: a command injection vulnerability in the Gemini Command Line Interface (CLI). To understand this, you must first understand what a command line is. It is a way to talk to your computer by typing text instead of clicking icons. In the Gemini CLI, there is a feature called ide install which allows users to add extra plugins, known as .vsix files.

The problem occurs because of how the computer processes the name of these files. When the researcher ran the tool in “IDE mode,” he found that the software takes the filename and joins it directly with a system command. In the world of coding, we call this “string concatenation.” For example, if the software wants to run install [filename], an attacker could name their file ; open -a Calculator. Because the programmer did not “sanitize” the input—which means checking it for tricks—the computer sees the semicolon and thinks it is supposed to start a brand-new task. Suddenly, instead of just installing a plugin, the computer opens the calculator! While opening a calculator is harmless, a real hacker could use this to delete files or steal your private data.

Moving on to a more complex topic, let us discuss the VirtualBox Integer Overflow. VirtualBox is a “Virtual Machine” (VM), which is essentially a computer running inside another computer. The guest (the inside computer) should never be able to mess with the host ( your actual computer). However, Vladimir found a way to “escape” this digital cage.

The flaw is located in a specific part of the graphics system called the VMSVGA-SVGA device. Inside the code, there is a function named vmsvga3dRectCopy. Its job is to move rectangles of pixels around the screen, similar to when you drag a folder across your desktop. To do this, the computer must calculate where the pixels are in the memory buffer.

Here is where the math gets tricky for the computer. The software uses a “32-bit unsigned integer” to check if the movement stays within the allowed memory area. However, the actual address where the data is stored uses a “64-bit” calculation. Think of it like this: your math teacher gives you a small ruler (32-bit) to measure a very long hallway (64-bit). If the measurement is too big for the small ruler, the number “overflows” and resets to a small number. Because the safety check sees a small number, it thinks everything is fine, even though the data is actually being written outside the safe boundaries of the buffer. This “Out-of-Bounds” error allows a researcher to read and write directly into the memory of the main computer, potentially taking total control.

Now, how did AI help find these? Usually, researchers use a tool called Semgrep to scan code. When Vladimir scanned the Gemini CLI, Semgrep gave him 6,000 warnings. No human has the time to check 6,000 things manually! This is where AI models like Claude Opus or GPT-4 come in. Vladimir used the AI to act as a filter. He instructed the AI to look at the 6,000 notifications and remove the ones that were clearly not real problems. The AI narrowed it down to just 12 interesting leads. Out of those 12, the researcher found the real vulnerabilities we just discussed.

However, you must remember that AI is not a magic button. It still makes mistakes, which we call “hallucinations.” Sometimes, the AI will swear a piece of code is broken when it is actually perfectly fine. A researcher must still use their intuition and “depth reasoning” to verify the findings. AI is excellent at “shallow tasks”—like checking a single function for a basic error—but it struggles with “deep tasks,” where you have to understand how ten different parts of a huge program work together over many steps.

In conclusion, the combination of traditional security tools and modern AI is making software safer than ever before. While attackers can use AI to build exploits faster, defenders use it to find and patch holes before they can be used for harm. If you are interested in becoming a security researcher, now is the best time to start. You have access to the same powerful AI assistants that the pros use. I recommend that you start by reading “write-ups” or blog posts about “CVEs” (Common Vulnerabilities and Exposures) that have already been fixed. This will help you understand the patterns of mistakes that programmers make. Keep practicing your coding skills, stay curious, and always remember to use your powers for good to help make the digital world a safer place for everyone!

Recent Posts

  • Make Linux Kernel More Safe and Hardening with Sysctl Easy Way
  • How to Lockdown Root & Wheel Group in Linux
  • How to Secure Sudo in Linux (Secure Sudo Logging & Timeout)
  • Make Fedora Login Safe with Authselect and Faillock
  • How Measure Linux Security Use OpenSCAP Lynis and Systemd
  • SELinux Make Nginx Break and How to Fix It Easy
  • How See Hidden SELinux Errors When Your Server Is Broken
  • How Fix SELinux Port Denied Error With Sealert Easy Guide
  • Read SELinux AVC Denial Log Simple Guide for Noob
  • How Check and Fix SELinux Block Things in Fedora Linux
  • How Actually SELinux is Work?
  • How to Install Elementary OS 8 Easy and Make It Good
  • How to Install UniFi OS Server on Ubuntu Linux Without Cloud Key
  • Top DNF5 Tips to Make Your Fedora Linux Super Fast
  • Run Local AI on Fedora 44 CPU Without Expensive GPU
  • Google Gemini Live Redesign: Works with more ‘Connected Apps’ on Android
  • A new LILYGO T3S3 ESP32-S3 with LoRA, WiFi & Bluetooth is Released only $16
  • New ESP32 Project: OpenTrafficMap ESP32-C5 C-ITS With 802.11p V2X communication
  • How to Unlock the Hidden Potential of Your Kindle with Amazing Community Plugins
  • How to Use Waze with Android Auto for the Ultimate Driving Experience
  • How to Transform Your GNOME Desktop with GNOME Prism
  • Why Your Google Maps Wear OS Navigation Fails While Using Android Auto
  • Packagist Attacked! How to Detect Hidden Malware Like This?
  • Claude Mythos Keeps Find High-severity Flaws, What You Should You Do?
  • How to Secure Your PHP Applications Against the Recent Laravel-Lang Supply Chain Attack and Credential Stealers
  • Inilah Cara Mengatasi Unknown USB Device Descriptor Request Failed yang Paling Ampuh
  • Inilah 20 Kampus Swasta Terbaik di Bandung Versi EduRank 2026 untuk Referensi Kuliah Kalian
  • Inilah Syarat dan Cara Daftar Sekolah Kedinasan STPN 2026, Kuota Terbatas!
  • Inilah Cara Daftar PPKB UI 2026 Lengkap dengan Rincian Uang Pangkal Semua Jurusan S1
  • Inilah Aturan Resmi MPLS 2026 dari Kemendikdasmen, Guru dan Sekolah Wajib Catat Pedoman Lengkap Ini!
  • How to Automate Your Entire SEO Strategy Using a Swarm of 100 Free AI Agents Working in Parallel
  • How to create professional presentations easily using NotebookLM’s AI power for school projects and beyond
  • How to Master SEO Automation with Google Gemini 3.1 Flash-Lite in Google AI Studio
  • How to create viral AI video ads and complete brand assets using the Claude and Higgsfield MCP integration
  • How to Transform Your Mac Into a Supercharged AI Assistant with Perplexity Personal Computer
RSS Error: WP HTTP Error: A valid URL was not provided.
©2026 Tutorial emka | Design: Newspaperly WordPress Theme