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-07-01. Synthesized from 360 of 360 curated resources. Browse all 360 API Security resources →

Problem Framing

APIs have become the connective tissue of modern digital infrastructure, powering everything from single-page applications and mobile clients to internal microservices and third-party integrations. This ubiquity, coupled with the rapid pace of development and the increasing adoption of cloud-native architectures and AI-driven development tools, has created a vastly expanded attack surface. Security teams are increasingly struggling to keep pace with the volume and complexity of API endpoints, leading to significant vulnerabilities. The current landscape is marked by the proliferation of unregistered, undocumented, shadow, rogue, and zombie APIs – collectively termed "API sprawl" – which often lack adequate security controls [1]. This lack of visibility and control creates blind spots, allowing attackers to discover and exploit unmanaged endpoints. Furthermore, the integration of AI into development workflows, while accelerating delivery, introduces new vectors for vulnerabilities, including insecure code generation and prompt injection attacks against AI agents themselves [2][3]. The impact of these vulnerabilities ranges from sensitive data exposure and credential theft to full-blown system compromise and tenant isolation violations, particularly in cloud and AI-centric environments.

Core Mechanics of API Vulnerabilities

At their core, API vulnerabilities stem from fundamental weaknesses in how APIs are designed, implemented, secured, and managed. These often mirror traditional web application vulnerabilities but are amplified by the direct, programmatic nature of API interactions and the sheer scale of deployment.

Authentication and Authorization Failures

A persistent and critical category of vulnerabilities involves failures in authentication and authorization mechanisms. This includes:

Data Exposure and Sensitive Information Leakage

APIs often handle highly sensitive data, making their exposure a primary target for attackers.

Injection and Command Execution

Classic injection flaws remain prevalent in API endpoints, often leading to more severe consequences in API contexts.

Tenant Isolation Violations

In multi-tenant SaaS environments, maintaining strict isolation between tenants is paramount. Vulnerabilities that bypass these controls are highly critical.

Resource Consumption and Denial of Service (DoS)

APIs can be targeted to exhaust resources, leading to denial of service.

Notable Vulnerability Classes and Techniques

Beyond the core mechanics, specific vulnerability classes and exploitation techniques are frequently observed in API security incidents.

API Sprawl and Shadow APIs

The sheer volume of APIs, including undocumented or unmanaged ones (API sprawl), significantly complicates security. Attackers exploit these blind spots, often targeting systems that have not been properly inventoried or secured [1]. These can include rogue, zombie, or forgotten APIs that remain operational long after their intended lifecycle.

Insecure Direct Object References (IDOR)

This vulnerability occurs when an API user is able to access objects (e.g., files, database records) that they are not authorized to access. It often stems from directly referencing sensitive objects via user-supplied identifiers without proper authorization checks.

Server-Side Request Forgery (SSRF)

SSRF vulnerabilities allow an attacker to induce the server-side application to make unintended or malicious HTTP requests to an arbitrary domain or internal resource. This is particularly dangerous in cloud environments, where attackers can target cloud metadata services (e.g., 169.254.169.254) to steal cloud provider credentials, API keys, and sensitive configuration data [33][34]. Tools like LiteLLM and LMDeploy have been found to have SSRF vulnerabilities, some of which were exploited rapidly after discovery [35][34].

Deserialization Vulnerabilities

Deserializing untrusted or malicious data can lead to Remote Code Execution (RCE) if the application does not properly validate the input. This was seen in WS_FTP [36] and the Hugging Face Transformers library, where a crafted model configuration could lead to RCE during load [37].

Mass Assignment

Mass assignment vulnerabilities occur when an API automatically maps all fields from a request body to a model object without explicit white-listing of allowed fields. This allows attackers to bind values to properties they should not be able to modify, potentially leading to privilege escalation or unauthorized data changes. Vulnerable APIs like VAmPI explicitly list this as a risk [38].

HTTP Request Smuggling

This class of attack exploits discrepancies in how different proxy servers or backend systems process HTTP requests. Techniques like CL.TE, TE.CL, and increasingly HTTP/2 variants (H2.CL, H2.TE), can allow attackers to smuggle requests, bypassing security controls like Web Application Firewalls (WAFs) and ACLs [39][40]. This has been observed targeting major platforms like AWS [40].

GraphQL Security Specifics

GraphQL, with its flexible query language, introduces unique security challenges. These include:

Vulnerabilities in AI Development Tools and Platforms

The rapid adoption of AI in development workflows has introduced new attack surfaces.

Detection and Prevention Strategies

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

Secure Design and Development Practices

Authentication and Authorization Enforcement

Runtime Protection and Monitoring

API Discovery and Inventory

Automated Security Testing

AI-Specific Security Measures

Tooling Landscape

The API security tooling ecosystem is diverse and rapidly evolving.

Discovery and Inventory

Testing and Scanning

Runtime Protection

Development and Integration

Secrets Management and Detection

Recent Developments and Emerging Threats

The API security landscape is dynamic, with new threats and defensive strategies emerging constantly.

AI-Powered Attacks and Vulnerabilities

Cloud-Native and Container Security

Supply Chain Attacks via SaaS Integrations

Exploitation of Protocol and Gateway Weaknesses

Where to Go Deeper

For practitioners seeking to deepen their understanding and practical skills in API security, several resources are invaluable.

Foundational Knowledge and Standards

Hands-On Practice and Learning Platforms

Tools and Techniques for Practitioners

Staying Current

Sources cited in this guide

  1. API Sprawl — ibm.com
  2. Vibe Coding Security: Why 62% Of AI-Generated Code Ships With Vulnerabilities — ox.security
  3. Microsoft Threat Intelligence Exposes Prompt Injection Flaw In Anthropic Claude Code Action — the420.in
  4. Hacking Moltbook: The AI Social Network Any Human Can Control — wiz.io
  5. ServiceNow API Security Incident Exposes Customer Data: Analysis of Unauthenticated Access Vulnerability (June 2026) — rescana.com
  6. Build an IDOR Vulnerability Lab: Why WHERE Clauses Don’t Protect Your API. — infosecwriteups.com
  7. What Is Broken Object Property Level Authorization? — paloaltonetworks.com
  8. API Attack Awareness: BOLA - Why It Tops the OWASP API Top 10 — securityboulevard.com
  9. Mass Exploitation of Gravity SMTP Plugin Exposes Enterprise API Keys Globally — the420.in
  10. Cisco patches critical 10.0 flaw in Secure Workload APIs — scworld.com
  11. Cisco Fixes CVE-2026-20223 Secure Workload API Flaw — thecyberexpress.com
  12. Cisco Patches Critical Vulnerability in Secure Workload — securityweek.com
  13. ClickUp Hardcoded API Key Exposes 959 Emails from Fortune 500 Giants — cyberpress.org
  14. State of Secrets: 28 Million Credentials Leaked on GitHub in 2025 — snyk.io
  15. Security Researcher: WordPress 7.0 Could Trigger Rush To Steal AI API Keys — searchenginejournal.com
  16. WordPress Email Plugin Flaw Triggers 17 Million Attacks: Gravity SMTP Leaks Live API Keys — techtimes.com
  17. Hackers Exploit Gravity SMTP WordPress Plugin Bug to Expose API Keys — thehackernews.com
  18. ServiceNow fixes API issue after reports of suspicious tenant activity — csoonline.com
  19. ServiceNow Data Breach: Gated Advisory Left Customers Unaware of Exploited Zero-Auth API — techtimes.com
  20. Financial Data Crisis! ChatGPT Spreadsheet Plugin Exposes Serious Security Vulnerability — news.aibase.com
  21. LiteLLM Contains Critical SQL Injection Vulnerability — letsdatascience.com
  22. Amazon Q Developer extension vulnerability could have exposed cloud credentials — scworld.com
  23. Amazon Q Developer Flaw Could Let Malicious Repos Run Code via MCP Configs — thehackernews.com
  24. 4 vulnerabilities in Dify expose cross-tenant data — scworld.com
  25. IngressNightmare: CVE-2025-1974 - 9.8 Critical Unauthenticated Remote Code Execution Vulnerabilities in Ingress NGINX — wiz.io
  26. Claude Code's Vulnerability in GitHub Actions Allows an Attacker to Compromise any Repository — cybersecuritynews.com
  27. Anthropic AI Vulnerability Scanner in Enterprise Beta: IBM Joins Glasswing After 10000 Flaws Found — techtimes.com
  28. SAPwned: SAP AI vulnerabilities expose customers’ cloud environments and private AI artifacts — wiz.io
  29. GraphQL Security Testing: Complete Guide — apisec.ai
  30. OWASP API Security Top 10 (2025) Guide with Tests — qodex.ai
  31. Top 10 OWASP API Security in 2026 — akto.io
  32. WordPress 7.0 Exposes AI API Keys — letsdatascience.com
  33. Detect SSRF Attacks in Cloud Applications and APIs | Datadog — datadoghq.com
  34. New LMDeploy Vulnerability Exploited in the Wild Just 12 Hours After Public Advisory — cyberpress.org
  35. LiteLLM Flaw CVE-2026-42271 Exploited in the Wild Chains to Unauthenticated RCE — thehackernews.com
  36. Proving API exploitability with Burp Collaborator — danaepp.com
  37. Hugging Face Transformers contains critical remote code execution vulnerability — letsdatascience.com
  38. Lovable left thousands of projects exposed for 48 days and the vibe coding security crisis is only getting worse — thenextweb.com
  39. Advanced request smuggling — portswigger.net
  40. Practical HTTP Header Smuggling: Sneaking Past Reverse Proxies to Attack AWS and Beyond — intruder.io
  41. Google Bug Hunter Claims $500K From AI-Assisted Vulnerability Pipeline — techrepublic.com
  42. FastAPI-based AI tools exposed to authentication bypass by flaw in Starlette framework — csoonline.com
  43. FastAPI-based AI tools exposed to authentication bypass by flaw in Starlette framework — infoworld.com
  44. Attackers Can Exploit BadHost to Access Sensitive AI Agent Server Endpoints — cybersecuritynews.com
  45. Vulnerability in open-source component puts AI platforms at risk — techzine.eu
  46. Claude Code's Network Sandbox Vulnerability Exposes User Credentials and Source Code — cybersecuritynews.com
  47. Google Gemini CLI Vulnerabilities Allow Attackers to Execute Commands on Host Systems — cybersecuritynews.com
  48. How to secure a REST API? — snyk.io
  49. Beyond CVEs: The Exploitation of Everyday Misconfigurations — wiz.io
  50. Exploiting JWT Vulnerabilities: Advanced Exploitation Guide — intigriti.com
  51. BOLA and BFLA: The API Vulnerabilities That Silently Expose Data — lorikeetsecurity.com
  52. Securing the Gates: Mastering BOLA and BFLA in API Security — kayssel.com
  53. Kong API Gateway Misconfigurations Case Study - Trend Micro — trendmicro.com
  54. 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
  55. 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
  56. open-appsec ML-based WAF protects against modern SQLi AutoSpear evasion techniques — openappsec.io
  57. Common API Security Vulnerabilities & Solutions (2026 Guide) — qodex.ai
  58. Eliminate Critical API Attack Paths with Wiz API SPM — wiz.io
  59. API Security Testing: Tools and Techniques - API7.ai — api7.ai
  60. API Testing | Web Security Academy — portswigger.net
  61. API Penetration Testing: Complete Guide — nflo.tech
  62. OWASP API Security Top 10 Risks — wiz.io
  63. Damn Vulnerable GraphQL Application — github.com
  64. [tl;dr sec] #330 - AWS Pathfinding Labs, Running Codex Safely at OpenAI, Glasswing Updates — tldrsec.com
  65. API Hacking - Just Hacking Training (JHT) — justhacking.com
  66. Automate your API hacking with Autorize — danaepp.com
  67. Critical vulnerabilities in NetScaler ADC exploited in-the-wild: everything you need to know — wiz.io
  68. Ollama Vulnerability Exposes Remote Process Memory — letsdatascience.com
  69. Critical Argo CD Vulnerability Enables Kubernetes Secret Extraction — cyberpress.org
📚 This guide is synthesized from the full text of resources curated in the API Security library, and refreshed as new material is added.