APIRL: Deep Reinforcement Learning for REST API Fuzzing

REST APIs have become key components of web services. However, they often contain logic flaws resulting in server side errors or security vulnerabilities. HTTP requests are used as test cases to find and mitigate such issues. Existing methods to modify requests, including those using deep learning, suffer from limited performance and precision, relying on undirected search or making limited usage of the contextual information. In this paper we propose APIRL, a fully automated deep reinforcement learning tool for testing REST APIs. A key novelty of our approach is the use of feedback from a transformer module pre-trained on JSON-structured data, akin to that used in API responses. This allows APIRL to learn the subtleties relating to test outcomes, and generalise to unseen API endpoints. We show APIRL can find significantly more bugs than the state-of-the-art in real world REST APIs while minimising the number of required test cases. We also study how reward functions, and other key design choices, affect learnt policies with a thorough ablation study.

Authors

Institutions

Publication Details

Journal
Proceedings of the AAAI Conference on Artificial Intelligence
Published
2025-04-11
DOI
https://doi.org/10.1609/aaai.v39i1.31995
Citations
3
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
5.87

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

APIRL: Deep Reinforcement Learning for REST API Fuzzing

Myles Foley, Sergio Maffeis
3 citations
Proceedings of the AAAI Conference on Artificial Intelligence
Software Engineering Research
5.87
article

APIRL: Deep Reinforcement Learning for REST API Fuzzing

Myles Foley, Sergio Maffeis
article en
3 citations

Abstract

REST APIs have become key components of web services. However, they often contain logic flaws resulting in server side errors or security vulnerabilities. HTTP requests are used as test cases to find and mitigate such issues. Existing methods to modify requests, including those using deep learning, suffer from limited performance and precision, relying on undirected search or making limited usage of the contextual information. In this paper we propose APIRL, a fully automated deep reinforcement learning tool for testing REST APIs. A key novelty of our approach is the use of feedback from a transformer module pre-trained on JSON-structured data, akin to that used in API responses. This allows APIRL to learn the subtleties relating to test outcomes, and generalise to unseen API endpoints. We show APIRL can find significantly more bugs than the state-of-the-art in real world REST APIs while minimising the number of required test cases. We also study how reward functions, and other key design choices, affect learnt policies with a thorough ablation study.

Proceedings of the AAAI Conference on Artificial IntelligenceVol. 39(1)
The Alan Turing Institute (GB), Imperial College London (GB)
Defence Science and Technology Laboratory, Engineering and Physical Sciences Research Council, Defence Science and Technology Group
Openalex Percentile: Top 4%
Software Engineering Research
5.87
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.