appsec.fyi

API Security — A Practical Guide

A curated AppSec resource library covering XSS, SQLi, SSRF, IDOR, RCE, XXE, OSINT, and more.

API Security: A Practical Guide

Curated and synthesized by . Last updated 2026-11-01. Synthesized from 317 of 317 curated resources. Browse all 317 API Security resources →

Problem Framing

APIs have become the connective tissue of modern software, facilitating data exchange, service integration, and application functionality. This pervasive adoption, however, has also made them a prime target for attackers. The sheer volume and complexity of APIs, coupled with rapid development cycles, create significant security blind spots [1]. A substantial portion of web traffic now consists of API calls, underscoring their role as a primary attack surface [2][3]. The statistics paint a stark picture: a significant majority of organizations have experienced API-related security incidents annually, and the cost of an API breach is substantial [2][3]. Furthermore, the integration of AI into development workflows, often characterized by "vibe-coding" and rapid prototyping, introduces new vectors for vulnerabilities. AI-generated code exhibits a higher density of security gaps, exacerbating the challenge of securing these increasingly complex systems [4][2]. Understanding and mitigating API security risks is therefore paramount for practitioners.

Core Mechanics: Attack Vectors and Vulnerabilities

API security is fundamentally about managing access control, data exposure, and the integrity of business logic implemented through API endpoints. Common vulnerabilities span several categories, often mirroring traditional web application risks but with API-specific nuances.

Authentication and Authorization Weaknesses

Authentication and authorization failures remain the most prevalent and impactful API vulnerabilities. This includes:

Data Exposure and Leakage

APIs frequently handle sensitive data, making their protection critical.

Injection and Input Validation Flaws

Traditional injection attacks remain relevant in the API context.

Business Logic and Flow Vulnerabilities

Exploiting the intended functionality of an application through its API can be a potent attack vector.

Server-Side Request Forgery (SSRF)

SSRF vulnerabilities occur when an API can be tricked into making requests to unintended internal or external resources. This can be used to scan internal networks, access sensitive cloud metadata, or interact with internal services [10][26].

HTTP Smuggling and Desync Attacks

These attacks exploit discrepancies in how different network intermediaries (e.g., load balancers, WAFs, backend servers) parse HTTP requests, particularly when dealing with Content-Length and Transfer-Encoding headers. This can lead to request splitting, response queue poisoning, and session cookie theft [27][28][29][30]. HTTP/2 desync attacks are also a growing concern [31].

AI-Specific Vulnerabilities

The integration of AI introduces novel attack surfaces.

Notable Techniques

Several specific techniques are frequently employed by attackers and are critical for practitioners to understand.

SVG Sanitizer Bypasses

Attackers can bypass SVG sanitizers using various techniques to achieve Cross-Site Scripting (XSS). These include:

These bypasses can be effective against multiple libraries designed to sanitize SVG input [19].

Weak JWT Signature Validation

JSON Web Tokens (JWTs) are commonly used for stateless authentication. Weaknesses arise when:

Loopjacking

This attack class targets applications that involve user interaction and state changes, particularly in API-driven workflows.

Loopjacking vulnerabilities have been identified in agent operating systems [38].

Exploiting Custom URL Schemes and PWAs

Progressive Web Apps (PWAs) and custom URL schemes can be exploited to bypass origin validation. An "Evil PWA" attack can leverage these mechanisms to trick the user into granting permissions or executing actions that violate usual browser security policies [25].

CRLF Injection for HTTP Desync Attacks

Carriage Return Line Feed (CRLF) injection is a potent technique for inducing HTTP desynchronization. This can be used for:

Tools like Hackvertor can assist in crafting these payloads [27].

Arbitrary File Read (Path Traversal)

This classic vulnerability allows attackers to read sensitive files from the server by manipulating path components in API requests. Notable instances include vulnerabilities in Atlassian products [39] and AWS AgentCore infrastructure [20].

Insecure Deserialization

Deserializing untrusted data without proper validation can lead to Remote Code Execution (RCE). This is a common risk when dealing with serialized objects, particularly in languages like Python (e.g., pd.read_pickle()) [32].

Uncontrolled Resource Consumption (Denial of Service)

APIs can be targeted with requests designed to exhaust server resources, leading to Denial of Service (DoS). This includes:

API Key Theft and Credit Consumption

API keys, once compromised, can be used for unauthorized access, data exfiltration, and malicious actions, often leading to unexpected credit consumption for the service provider. This has been observed in contexts ranging from cloud services to AI model platforms [12][21].

Exposure of OTPs in API Responses

One-Time Passwords (OTPs) are critical for multi-factor authentication. Exposing these in API responses, even temporarily, can enable account takeover attacks [43].

Unauthenticated API Endpoint Exposing Sensitive Data

A common and critical issue is the existence of API endpoints that should be protected but are publicly accessible without authentication, leading to the exposure of user records, PII, or other sensitive information [44].

Exploiting Agent Harnesses for Forged Instructions

In environments utilizing agent frameworks, vulnerabilities in agent harnesses can allow attackers to inject forged instructions, leading to unauthorized tool execution or command execution [20].

Detection & Prevention

A multi-layered approach is essential for detecting and preventing API security threats.

Automated Scanning and Testing

Runtime Security and Monitoring

Secure Development Practices

Specific Prevention Techniques

Tooling

A diverse set of tools is available to assist practitioners in securing APIs.

Vulnerability Discovery and Scanning

Runtime Protection and Posture Management

Developer and Integration Tools

Specialized Tools

Recent Developments

The API security landscape is rapidly evolving, driven by the increasing adoption of APIs, cloud-native architectures, and AI.

AI-Accelerated Attack Surface and Vulnerability Discovery

AI is significantly impacting both attack and defense. Attackers are leveraging AI for reconnaissance, vulnerability discovery, and automated exploitation at scale. Conversely, AI-powered tools are emerging to automate vulnerability remediation, provide autonomous virtual patching, and accelerate security testing [73][36][2]. AI-generated code exhibits a higher rate of vulnerabilities, necessitating robust security scanning for AI-assisted development [2].

Securing AI Agents and Workflows

The rise of AI agents and complex AI workflows presents new security challenges. Vulnerabilities in AI frameworks, orchestrators, and the handling of Model Context Protocol (MCP) configurations are being discovered, leading to RCE, data leaks, and unauthorized tool execution [32][74][8][33][34][35]. Securing the supply chain for AI/ML models and ensuring the safe execution of AI workloads are critical concerns [36].

API Sprawl and Governance

The exponential growth of APIs ("API sprawl") creates unmanaged and undocumented endpoints, expanding the attack surface. API Security Posture Management (API SPM) solutions are gaining prominence to address this by discovering, inventorying, and assessing the risks associated with all exposed APIs [51].

Focus on Business Logic Vulnerabilities (BFLA)

While technical vulnerabilities like injection and broken access control remain prevalent, there's an increasing emphasis on business logic flaws (BFLA). These are often missed by automated scanners and require manual or context-aware testing to exploit legitimate but unintended functionality [7][37].

Supply Chain Security for AI/ML

The security of third-party APIs, AI models, and dependencies is paramount. Supply chain attacks can compromise build systems or inject malicious code into artifacts, impacting downstream applications and APIs [36].

Advancements in HTTP Smuggling and Desync Attacks

Research continues to uncover new variations of HTTP request smuggling, including HTTP/2-specific attacks, which can bypass traditional WAFs and security controls [31][29][75].

Where to Go Deeper

For practitioners seeking to deepen their expertise in API security, several resources and communities are invaluable.

Sources cited in this guide

  1. API Security Risks Rise as AI Adoption Accelerates — esecurityplanet.com
  2. What Actually Matters For Web Application Security In The AI Era? — news.designrush.com
  3. OWASP API Security Top 10 (2025) Guide with Tests — qodex.ai
  4. Hacking Moltbook: The AI Social Network Any Human Can Control — wiz.io
  5. Lovable Left Thousands of Projects Exposed for 48 Days And Still Hasn't Fixed It — cyberkendra.com
  6. BOLA API Attack & Prevention — StackHawk — stackhawk.com
  7. BOLA and BFLA: The API Vulnerabilities That Silently Expose Data — lorikeetsecurity.com
  8. PraisonAI vulnerability gets scanned within 4 hours of disclosure — csoonline.com
  9. API Security Reality Check: Q2 2025 API ThreatStats Report — lab.wallarm.com
  10. OWASP Top 10 API Security Risks and How to Mitigate Them — Pynt — pynt.io
  11. OWASP Top 10 Kubernetes Security Risks Explained: Why Credentials Deserve a Closer Look — blog.gitguardian.com
  12. "But marinade" and leaked passwords are what researchers found in ChatGPT's hidden reasoning — the-decoder.com
  13. Security Researcher: WordPress 7.0 Could Trigger Rush To Steal AI API Keys — searchenginejournal.com
  14. JetBrains TeamCity vulnerability allows privilege escalation API exposure (CVE-2026-44413) — helpnetsecurity.com
  15. React Native Apps Should Start With Zero API Keys. Kerb Runs 52 Screens on None. — medium.com
  16. Preventing broken access control in express Node.js applications — snyk.io
  17. How Cloudflare addressed a cross-tenant data exposure vulnerability in Containers — blog.cloudflare.com
  18. ServiceNow patches three maximum severity flaws that could put enterprise data at risk — csoonline.com
  19. Scalable Vector Grief — portswigger.net
  20. AWS AgentCore Harness Bypass Exposed a Cross-Platform Vulnerability Class in Agent Runtimes — cryptorank.io
  21. Claude Code and Gemini CLI Flaws Let a GitHub Issue Reach CI Workflow Secrets — thehackernews.com
  22. Payment Bypass Flaw in TechPSC HUB — infosecwriteups.com
  23. ARTEX in the Wild: Storm-0940 Expands Targeting of IT and Software Vendors — wiz.io
  24. I Changed One “User_Id” and the API Said “Sure” — From Password Reset to Mass Account Takeover — infosecwriteups.com
  25. Why Protocol Matters: Evil PWA Attack on Casdoor — blog.slonser.info
  26. Detect SSRF Attacks in Cloud Applications and APIs | Datadog — datadoghq.com
  27. CRLF-Powered Desync Attacks: Beheading HTTP Streams — portswigger.net
  28. HTTP Request Smuggling in Hiawatha — fenrisk.com
  29. Advanced request smuggling — portswigger.net
  30. How to set up Docker for Varnish HTTP/2 request smuggling — labs.detectify.com
  31. HTTP/2: The Sequel is Always Worse — portswigger.net
  32. Cruising for Shells in Flowise - elttam — elttam.com
  33. Ollama Out-of-Bounds Read Vulnerability Allows Remote Process Memory Leak — thehackernews.com
  34. Ollama vulnerability highlights danger of AI frameworks with unrestricted access — csoonline.com
  35. Major AI platform Ollama critically leaking: 300000 servers exposed to hackers — cybernews.com
  36. Securing the AI Edge: Wiz and Cloudflare Integrate for End-to-End AI Protection — wiz.io
  37. Common API Security Vulnerabilities & Solutions (2026 Guide) — qodex.ai
  38. Loopjacking: Hijacking Human-in-the-Loop Approval — arxiv.org
  39. You Won’t Hear About These, Even In Myths (Atlassian Jira, Confluence (and more) Pre-Auth Arbitrary File Read CVE-2026-21589) — labs.watchtowr.com
  40. Traefik | Version Through 3.7.11 — bishopfox.com
  41. GraphQL Security Testing: Complete Guide — apisec.ai
  42. Awesome GraphQL Security - Curated List of Resources — github.com
  43. Tata’s B2B platform returned OTPs in API responses — eaton-works.com
  44. How an Unauthenticated API Endpoint Exposed 19,990 User Records — infosecwriteups.com
  45. How to secure Python Flask applications — snyk.io
  46. Extending developer security with dev-first dynamic testing — snyk.io
  47. API Security Testing Tool Checklist (2026) — brightsec.com
  48. Top 6 API Pentesting Tools | Cobalt — cobalt.io
  49. API Hacking - Just Hacking Training (JHT) — justhacking.com
  50. Enhancing REST API Fuzzing with Access Policy Violation Detection — arxiv.org
  51. Eliminate Critical API Attack Paths with Wiz API SPM — wiz.io
  52. GitHub - fabriziosalmi/patterns: Automated OWASP CRS and Bad Bot Detection for Caddy, Nginx, Apache, Traefik and HaProxy — github.com
  53. GitHub - samwafgo/SamWaf: SamWaf开源轻量级网站防火墙,完全私有化部署 SamWaf is a lightweight, open-source web application firewall for small companies, studios, and personal websites. It supports fully private deployment, encrypts data stored locally, is easy to start, and supports Linux and Windows 64-bit. — github.com
  54. GitHub - chaitin/SafeLine: SafeLine is a self-hosted WAF(Web Application Firewall) / reverse proxy to protect your web apps from attacks and exploits. — github.com
  55. How to secure a REST API? — snyk.io
  56. Kong API Gateway Misconfigurations: A Security Case Study — trendmicro.com
  57. Cisco serves up yet another perfect 10 bug with Secure Workload admin flaw — theregister.com
  58. FastAPI-based AI tools exposed to authentication bypass by flaw in Starlette framework — csoonline.com
  59. Exploiting trust: Weaponizing permissive CORS configurations — outpost24.com
  60. GraphQL Security Best Practices: A Developer's Guide — stackhawk.com
  61. WebSockets are a Pain - A Journey in Learning and Leveraging — blog.zsec.uk
  62. API Testing with Burp Suite: A Practical Guide — pynt.io
  63. Teycir/BurpAPISecuritySuite: Burp Suite extension for API security testing with 15 attack types, 108+ payloads, intelligent fuzzing, BOLA/IDOR detection, AI integration, and automated reconnaissance. Supports REST/GraphQL/SOAP APIs with Nuclei, Turbo Intruder, and external tool integration. OWASP API Top 10 coverage. — github.com
  64. Mapping Your API Ecosystem: Wiz Expands API Discovery with Apigee — wiz.io
  65. Damn Vulnerable GraphQL Application — github.com
  66. KCD New York 2026: Trust, Agents, and the Work Behind the Work — blog.gitguardian.com
  67. 42Crunch Announces Integration With Claude Code For Real-Time API Vulnerability Detection And Remediation — marketscreener.com
  68. [tl;dr sec] #330 - AWS Pathfinding Labs, Running Codex Safely at OpenAI, Glasswing Updates — tldrsec.com
  69. GitHub - c0dejump/HExHTTP: Header Exploitation HTTP — github.com
  70. Automate your API hacking with Autorize — danaepp.com
  71. WebSocket Turbo Intruder: Unearthing the WebSocket Goldmine — portswigger.net
  72. GitHub - fosrl/pangolin: Identity-Aware Tunneled Reverse Proxy Server with Dashboard UI — github.com
  73. Indusface Introduces SwyftComply AI Defining the Next Era of Application Security with Autonomous Vulnerability Remediation — prnewswire.co.uk
  74. Amazon Q Developer Flaw Could Let Malicious Repos Run Code via MCP Configs — thehackernews.com
  75. Practical HTTP Header Smuggling: Sneaking Past Reverse Proxies to Attack AWS and Beyond — intruder.io
  76. OWASP API Security Top 10 Risks — wiz.io
  77. CosmosEscape: Taking Over Every Azure Cosmos DB — wiz.io
  78. IngressNightmare: CVE-2025-1974 - 9.8 Critical Unauthenticated Remote Code Execution Vulnerabilities in Ingress NGINX — wiz.io
  79. OAuth 2.0 — googleapis.github.io
  80. Using JWTs in Python Flask REST Framework | AppSignal Blog — blog.appsignal.com
📚 This guide is synthesized from the full text of resources curated in the API Security library, and refreshed as new material is added.