0:00
–:––
React at 0:00
Black Hat USA 2025

More Flows, More Bugs: Empowering SAST with LLMs and Customized DFA

Yuan Luo, Tencent Security YunDing Lab; Zhaojun Chen, Tencent Security YunDing Lab; Yi Sun, Tencent Security YunDing Lab; Rhettxie Rhettxie, Tencent Security YunDing LabApplication Security: Defense

When and where

Day
Thu 7 Aug 2025
Time
13:30 to 14:10 PDT
Room
Jasmine A & E, Level 3

Speakers

  • Yuan LuoTencent Security YunDing Lab

    Dr. Yuan Luo is a Senior Security Engineer at Tencent Security YunDing Lab. He earned his Ph.D. in cybersecurity.

  • Zhaojun ChenTencent Security YunDing Lab

    Zhaojun Chen is a Senior Security Engineer at Tencent Security YunDing Lab. He has focused on web application security for more than a decade, specializing in Java vulnerability research and SAST. He has reported multiple high risk vulnerabilities in applications such as Apache, Spring, and XStream.

  • Yi SunTencent Security YunDing Lab

    Yi Sun is a Senior Security Engineer at Tencent Security YunDing Lab.

  • Rhettxie RhettxieTencent Security YunDing Lab

    Rhettxie is a Senior Security Engineer at Tencent Security YunDing Lab.

Abstract

Static Application Security Testing (SAST) plays a significant role in modern vulnerability discovery. For example, GitHub uses CodeQL to scan repositories. However, our analysis of over 100 real-world vulnerabilities has revealed that its detection performance is limited by two main factors: 1) incomplete source and sink coverage in built-in propagation rules, and 2) disruptions in data flow due to insufficient support for certain language features. In this talk, we will introduce a framework to empower SAST tools' capabilities to identify previously undetectable vulnerabilities and new CVEs. First, we will demonstrate how to leverage Large Language Models (LLMs) to automatically identify sources and sinks from open-source frameworks. Second, we will introduce the implementation principles of CodeQL's Data Flow Analysis (DFA). By developing patches for the DFA's QL language library, we have addressed language feature challenges, including Java reflection handling, partial native method support, and value passing model optimization. Our enhancements support 191 sources and sinks across 18 frameworks. Through comprehensive verification of over 5,000 repositories, we identified a more than 15% increase in data flows when utilizing existing rules, compared to results without the enhancements. Additionally, we reproduced over 50 historical CVEs that were undetectable by the original CodeQL due to a lack of language features support. Our research also uncovered 5 new CVEs (e.g., CVE-2024-45387) that the original CodeQL could not detect. We believe our work will greatly empower the detection capabilities of SAST tools.

What you'll get from it

Static analysis tools such as CodeQL miss real vulnerabilities for two reasons, this team found after studying more than 100 of them: incomplete coverage of sources and sinks, and broken data flows where language features aren't supported. They use language models to find sources and sinks in open-source frameworks automatically, and patch CodeQL's data flow library to handle things like Java reflection. Across more than 5,000 repositories, that raised data flows found by over 15%, reproduced more than 50 old CVEs CodeQL had missed and found five new ones. It's for anyone who runs or builds static analysis.

Did you find what you came for?