PrediQL: Automated Testing of GraphQL APIs with LLMs

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Liu, Shaolun, Marefat, Sina, Tsai, Omar, Chen, Yu, Deng, Zecheng, Wang, Jia, Tayebi, Mohammad A.
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908601354813440
author Liu, Shaolun
Marefat, Sina
Tsai, Omar
Chen, Yu
Deng, Zecheng
Wang, Jia
Tayebi, Mohammad A.
author_facet Liu, Shaolun
Marefat, Sina
Tsai, Omar
Chen, Yu
Deng, Zecheng
Wang, Jia
Tayebi, Mohammad A.
contents GraphQL's flexible query model and nested data dependencies expose APIs to complex, context-dependent vulnerabilities that are difficult to uncover using conventional testing tools. Existing fuzzers either rely on random payload generation or rigid mutation heuristics, failing to adapt to the dynamic structures of GraphQL schemas and responses. We present PrediQL, the first retrieval-augmented, LLM-guided fuzzer for GraphQL APIs. PrediQL combines large language model reasoning with adaptive feedback loops to generate semantically valid and diverse queries. It models the choice of fuzzing strategy as a multi-armed bandit problem, balancing exploration of new query structures with exploitation of past successes. To enhance efficiency, PrediQL retrieves and reuses execution traces, schema fragments, and prior errors, enabling self-correction and progressive learning across test iterations. Beyond input generation, PrediQL integrates a context-aware vulnerability detector that uses LLM reasoning to analyze responses, interpreting data values, error messages, and status codes to identify issues such as injection flaws, access-control bypasses, and information disclosure. Our evaluation across open-source and benchmark GraphQL APIs shows that PrediQL achieves significantly higher coverage and vulnerability discovery rates compared to state-of-the-art baselines. These results demonstrate that combining retrieval-augmented reasoning with adaptive fuzzing can transform API security testing from reactive enumeration to intelligent exploration.
format Preprint
id arxiv_https___arxiv_org_abs_2510_10407
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle PrediQL: Automated Testing of GraphQL APIs with LLMs
Liu, Shaolun
Marefat, Sina
Tsai, Omar
Chen, Yu
Deng, Zecheng
Wang, Jia
Tayebi, Mohammad A.
Cryptography and Security
Software Engineering
GraphQL's flexible query model and nested data dependencies expose APIs to complex, context-dependent vulnerabilities that are difficult to uncover using conventional testing tools. Existing fuzzers either rely on random payload generation or rigid mutation heuristics, failing to adapt to the dynamic structures of GraphQL schemas and responses. We present PrediQL, the first retrieval-augmented, LLM-guided fuzzer for GraphQL APIs. PrediQL combines large language model reasoning with adaptive feedback loops to generate semantically valid and diverse queries. It models the choice of fuzzing strategy as a multi-armed bandit problem, balancing exploration of new query structures with exploitation of past successes. To enhance efficiency, PrediQL retrieves and reuses execution traces, schema fragments, and prior errors, enabling self-correction and progressive learning across test iterations. Beyond input generation, PrediQL integrates a context-aware vulnerability detector that uses LLM reasoning to analyze responses, interpreting data values, error messages, and status codes to identify issues such as injection flaws, access-control bypasses, and information disclosure. Our evaluation across open-source and benchmark GraphQL APIs shows that PrediQL achieves significantly higher coverage and vulnerability discovery rates compared to state-of-the-art baselines. These results demonstrate that combining retrieval-augmented reasoning with adaptive fuzzing can transform API security testing from reactive enumeration to intelligent exploration.
title PrediQL: Automated Testing of GraphQL APIs with LLMs
topic Cryptography and Security
Software Engineering
url https://arxiv.org/abs/2510.10407