Skip to content
Open access

Analysis and mitigation of JWT and OAuth 2.0 vulnerabilities in REST APIs

I. Opirskyy I. A. Kunakh
Jul 2026 · Radiotekhnika · pp. 65-75 · 0 citations

TL;DR

A training and testing platform based on FastAPI was developed, featuring a fully manual implementation of JWT and OAuth 2.0 without the use of third-party libraries, showing that all six identified critical vulnerabilities were successfully reproduced in a vulnerable configuration and completely mitigated after applying the corresponding security controls.

Abstract

Modern web and mobile applications widely use JSON Web Tokens (JWT) and the OAuth 2.0 protocol for user authentication. However, implementation flaws remain one of the most common causes of account compromise. This paper investigates typical vulnerabilities in authentication mechanisms based on JWT and OAuth 2.0, including alg=none, algorithm confusion, the use of weak secret keys, the absence of token expiration validation (exp/iat), role forgery, and the lack of mandatory implementation of the Proof Key for Code Exchange (PKCE) mechanism in the Authorization Code Flow. To enable practical analysis and demonstration of these vulnerabilities, a training and testing platform based on FastAPI was developed, featuring a fully manual implementation of JWT and OAuth 2.0 without the use of third-party libraries. The platform includes both vulnerable and secure server implementations, allowing clear demonstration of attack exploitation mechanisms and the effectiveness of security measures in a controlled environment. The results show that all six identified critical vulnerabilities were successfully reproduced in a vulnerable configuration and completely mitigated after applying the corresponding security controls. The developed platform can be used as an effective educational tool for students and developers to gain practical experience in securing authentication mechanisms.

Read PDF

Similar papers

Open access Aug 2026

Cloud in the crosshairs: exposing vulnerabilities in web-based management interfaces of open-source IaaS platforms

This study conducts a large-scale empirical security analysis of the web-based management interfaces of ten widely used open-source Infrastructure-as-a-Service (IaaS) platforms, identifying 16 vulnerabilities spanning nine classes, including high-severity flaws that enable account takeover.

Alexandros Perrakis, Efstratios Chatzoglou, Vyron Kampourakis et al. · 0 citations
#small language model Book Open access Oct 2026

Defensive Capability Analysis for JavaScript Libraries

A defensive capability analysis for JavaScript libraries that soundly reports every exercised capability for code executed under a lightweight protected runtime, complementing the static analysis with a lightweight runtime enforcement mechanism that blocks those patterns.

Wen-Yu Xu, Anders Møller · 0 citations
Preprint Sep 2026

Fast and Secure Simultaneous Authentication of Equals for WPA3

The Simultaneous Authentication of Equals (SAE) protocol, introduced in WPA3, provides robust protection against offline dictionary attacks against a network Pre-Shared Key (PSK) and also protection of session keys from other people knowing that PSK. However, its high computational cost for the Password Element (PE) de...

João M. Ferreira, A. Zúquete, Hélder Gomes · 0 citations
Open access Sep 2026

From Open Redirect to JavaScript Execution via CVE-2024-4367

This case study presents a forensically documented analysis of a multi-stage security incident involving CVE-2024-4367, an arbitrary JavaScript execution vulnerability in PDF.js. The incident occurred on one PKP Open Journal Systems (OJS) deployment. The observed chain involved an open redirect in the host platform's s...

Muhammad Hendra Sunarya, M. N. D. Nugroho, Reja Revaldy F et al. · 0 citations
Open access Sep 2026

Security analysis of selected web applications using vulnerability scanners

Web applications are among the most frequently targeted systems in today’s cyber-threat landscape, and vulnerabilities such as SQL injection, cross-site scripting and various configuration errors have dominated the OWASP Top 10 list for years. This article examines the security of a web application using modern vulnera...

Mariusz Choroś, Marta Dziuba-Kozieł · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.