← Latest papers
🤖 AI

Detecting Privilege Escalation in Polyglot Microservices via Agentic Program Analysis

This paper introduces Neo, an agentic program analysis framework that combines large language models with classic program analysis to effectively detect privilege escalation vulnerabilities in complex, polyglot microservice architectures, successfully identifying 24 zero-day flaws across 25 open-source applications with high precision and recall.

Original authors: Penghui Li, Hong Yau Chong, Yinzhi Cao, Junfeng Yang

Published 2026-05-18
📖 5 min read🧠 Deep dive

Original authors: Penghui Li, Hong Yau Chong, Yinzhi Cao, Junfeng Yang

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 a massive, high-tech city where every building is a separate, specialized shop. One shop sells clothes, another handles bank transfers, and a third manages user accounts. In the modern digital world, these "shops" are called microservices. They are great because they can grow independently and fix themselves if they break. However, because they are all different shops built by different people using different tools (some use Python, some Java, some Go), keeping track of who is allowed to do what becomes a nightmare.

This is where NEO comes in. Think of NEO as a super-smart, tireless security detective that combines two powerful skills:

  1. The Human Intuition of a Large Language Model (LLM): Like a detective who can read a note and understand the intent behind the words (e.g., "This person is trying to change their role").
  2. The Precision of a Robot Map Reader: Like a detective who can instantly trace every single footstep a person took through the entire city, across different buildings, without getting lost.

The Problem: The "Role-Playing" Glitch

The paper explains a specific danger called Privilege Escalation. Imagine a customer named Alice wants to change her profile from "Regular User" to "Developer."

  • She walks into the Gateway Shop (the front door). The guard checks her ID (Authentication). "Okay, you are Alice."
  • She goes to the Profile Shop. The clerk takes her request and passes it to the User Management Shop.
  • The User Management Shop changes her role.

The Flaw: The shops didn't talk to each other properly. The first shop checked who she was, but the last shop didn't check what she was allowed to do. An attacker could trick the system into saying, "Change Alice's role to Admin" instead of "Developer." Because the shops didn't coordinate, the system lets the attacker become the boss. This is like a hotel guest walking into the kitchen, telling the chef, "I'm the manager now, give me the keys to the vault," and the chef, not knowing the guest is just a guest, hands them over.

The Challenge: Why is this hard to find?

Finding these holes is incredibly difficult for three reasons:

  1. The Polyglot Puzzle: The city is built with different languages. The Gateway might speak Java, while the User Manager speaks Python. Old security tools are like translators who only speak one language; they can't follow the conversation across the border.
  2. The Hidden Meaning: A computer sees code as symbols. It doesn't know that setUserRole() is a "power move" that needs a special permit. It just sees a function name. Humans understand the meaning, but computers need help.
  3. The Maze: The path from the front door to the vault might twist through 10 different buildings, involving middleware, routers, and decorators. Old tools get lost in the maze.

The Solution: How NEO Works

The researchers built NEO, an "Agentic" system. Think of NEO not as a static scanner, but as a detective with a smart plan and a magic toolkit.

1. The Magic Toolkit (Code Search Primitives)

Instead of asking the detective to read every single book in the library (which would take forever and overwhelm their brain), NEO gives them specific, powerful tools:

  • "Find the Name" Tool: Instantly finds every function named "update" or "role."
  • "Trace the Flow" Tool: Follows a piece of data (like a user's request) from the front door all the way to the vault, even if it jumps between different languages.
  • "Who Called Who" Tool: Maps out the entire chain of command to see who is talking to whom.

These tools act as a universal translator, allowing the detective to understand Java, Python, and Go equally well without getting confused by the syntax.

2. The Detective's Brain (The LLM Agent)

NEO uses a Large Language Model (LLM) as its brain.

  • Dynamic Planning: Instead of following a rigid checklist, the detective looks at the map, sees a suspicious path, and decides, "I need to check the router in the next building." It then uses the Magic Toolkit to zoom in on that specific spot.
  • Semantic Understanding: The detective reads the code and understands, "Ah, this function changes a user's permission. That's a 'privileged operation' and needs a strict check."
  • Validation: The detective doesn't just guess. It asks, "Is there a guard at this door?" If it finds a check, it reads the guard's rules to see if they are strict enough. (e.g., "The guard checks if you are logged in, but does he check if you are allowed to be an Admin? No? Then it's a vulnerability.")

The Results: A Record-Breaking Hunt

The researchers tested NEO on 25 real-world microservice applications (like online stores and ticketing systems) containing millions of lines of code.

  • The Discovery: NEO found 24 brand-new (zero-day) vulnerabilities that no one knew about before.
  • Accuracy: It was right about 81% of the time when it raised an alarm and caught 85% of the real problems.
  • Comparison:
    • Old Tools (like MScan or CodeQL): These are like detectives who only speak one language or only look at one building. They missed most of the cross-building attacks.
    • Other AI Agents (like EnIGMA): These are like detectives who try to read every single page of every book in the library. They get overwhelmed, run out of time, and miss the clues.
    • NEO: By using the "Magic Toolkit" to grab only the relevant pages and the "Detective Brain" to understand the story, NEO found 24 more vulnerabilities than the next best method.

The Takeaway

NEO proves that you don't have to choose between "smart AI" and "precise code analysis." By combining them, you get a system that can navigate the complex, multi-language, multi-building world of modern cloud software to find security holes that were previously invisible.

The researchers responsibly reported all their findings to the software owners. Many have already been fixed, making these digital cities safer for everyone.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →