Security is Key: The Vulnerabilities of API Security
Joe Wrieden (Intelligence Analyst · Cyjax)
Security BSides London 2023 · Day 1 · Track 2
Overview
In an insightful talk at BSides London, Joe Wrieden, an Intelligence Analyst at Cyjax, dissected the multifaceted landscape of API security, underscoring the critical vulnerabilities that plague these ubiquitous digital intermediaries. Titled "Security is Key: The Vulnerabilities of API Security," Wrieden's presentation served as a stark reminder of the escalating risks associated with inadequately secured Application Programming Interfaces. As APIs become the backbone of modern software architecture, facilitating data exchange between disparate systems, their compromise can lead to widespread data breaches, operational disruptions, and significant reputational damage.

Key moments
- 0:00 Introduction and the growing importance of APIs
- 3:50 Why threat actors target APIs (external endpoints, zombie APIs)
- 6:10 Three main categories of API vulnerabilities: code, infrastructure, developers
- 15:40 Case study: Postman API key exposure vulnerability
- 22:00 Core conclusions: security is key, awareness, build security in
- 26:30 Q&A: Bridging developer and security teams for proactive security
Security is Key: The Vulnerabilities of API Security
Speakers: Joe Wrieden, Intelligence Analyst, Cyjax
Conference: BSides London
YouTube: https://www.youtube.com/watch?v=XYq9ONZ_2r8
Overview
In an insightful talk at BSides London, Joe Wrieden, an Intelligence Analyst at Cyjax, dissected the multifaceted landscape of API security, underscoring the critical vulnerabilities that plague these ubiquitous digital intermediaries. Titled "Security is Key: The Vulnerabilities of API Security," Wrieden's presentation served as a stark reminder of the escalating risks associated with inadequately secured Application Programming Interfaces. As APIs become the backbone of modern software architecture, facilitating data exchange between disparate systems, their compromise can lead to widespread data breaches, operational disruptions, and significant reputational damage.
Wrieden meticulously categorized API vulnerabilities into three primary areas: attacks on code, attacks on infrastructure, and a more nuanced category focusing on developers themselves. He emphasized that the rapid adoption and increasing complexity of APIs have outpaced security considerations, creating fertile ground for threat actors. The talk not only highlighted the technical intricacies of various attack vectors but also stressed the importance of a holistic security approach that integrates proactive measures, developer education, and responsible disclosure practices.
This article delves into the core tenets of Wrieden's presentation, exploring the pervasive nature of API vulnerabilities and outlining actionable strategies for both developers and security professionals. By providing a comprehensive breakdown of the threats and their implications, it aims to reinforce the speaker's central message: robust API security is not merely an afterthought but a fundamental requirement for protecting digital assets in today's interconnected world.
Background
▶ Watch: Introduction and the growing importance of APIs (0:00)
APIs, as defined by IBM and highlighted by Wrieden, serve as an intermediary layer to process data transfer between systems. Since their popularization by Salesforce in the early 2000s, APIs have evolved from a niche technology into an indispensable component of modern software development and digital infrastructure. Their omnipresence is undeniable: in 2020, 90% of developers utilized APIs in their projects, with 70% expected to increase their API usage in 2023 compared to 2022. Furthermore, a significant 40% of companies now manage over 250 internal APIs, demonstrating their deep integration into organizational tooling and operations.
The core functionality of an API revolves around a client sending a request, the API forwarding it to a server, the server processing and responding, and the API relaying the response back to the client. Crucially, API keys typically form the authentication layer in this model. Unlike traditional username/password systems, an API key often serves a dual purpose, providing both identification and authentication. This dual role means that a compromised API key can grant an attacker not only access but also the ability to impersonate the legitimate user, effectively acting as both username and password.
The current state of API security is a cause for significant concern. Wrieden cited alarming statistics from Salt Security's API Trends report, revealing that a staggering 94% of organizations reported experiencing security problems with their APIs. Nearly a third (30%) of these issues involved sensitive data exposure, and 17% resulted in data breaches, with compromised data often ending up on dark web marketplaces. This precarious security landscape makes APIs exceptionally attractive targets for threat actors for three primary reasons: they serve as external endpoints for system interaction, often requiring broad access for user input; their inherent design often exposes them to a wider range of potential inputs compared to other locked-down endpoints; and the prevalence of "Zombie APIs"—dormant, unmaintained, and undocumented APIs left running in networks—provides perfect, often forgotten, entry points for attackers.
Key Findings
▶ Watch: Three main categories of API vulnerabilities: code, infrastructure, developers (6:10)
Joe Wrieden's presentation meticulously categorized API vulnerabilities into three overarching themes: attacks on code, attacks on infrastructure, and attacks on developers. These categories provide a structured approach to understanding the diverse ways APIs can be compromised, highlighting that security weaknesses can stem from flaws in implementation, underlying system configurations, or even human error in development practices.
The most prominent category, "attacks on code," was encapsulated by what Wrieden playfully termed the "Broken Brothers." These four critical vulnerability types consistently rank at the top of the OWASP API Security Top 10 list (both in 2019 and 2022/2023), underscoring their widespread prevalence and severe impact. They represent fundamental flaws in how authorization and authentication are implemented within API codebases, often allowing attackers to bypass intended access controls by manipulating requests.
Beyond code-level flaws, Wrieden detailed "attacks on infrastructure," which focus on abusing the servers and network resources supporting the API. These vulnerabilities, while sometimes overlapping with code issues, primarily aim to disrupt service availability or gain unauthorized access to internal systems through the API as a proxy. Finally, the concept of "attacks on developers" introduced a more nuanced perspective, examining how developers' practices, often unknowingly, can expose sensitive information and create vulnerabilities that threat actors can exploit, even without directly attacking the developer themselves. This category underscored the human element in API security and the need for greater awareness throughout the development lifecycle.
Technical Deep Dive
▶ Watch: Case study: Postman API key exposure vulnerability (15:40)
Wrieden's deep dive into API vulnerabilities provided specific, actionable insights into how these systems are compromised, categorizing attacks based on their primary target: the API's code, its underlying infrastructure, or the development practices surrounding it.
Attacks on Code: The Broken Brothers
This category highlights critical authorization and authentication flaws, consistently topping the OWASP API Security Top 10:
- Broken Object Level Authorization (BOLA): This vulnerability arises when an API does not properly verify if a user is authorized to access a specific resource or "object." Attackers exploit BOLA by manipulating request parameters, such as ID numbers (e.g., changing
user_id=123touser_id=0oruser_id=456). If the API fails to check the user's authorization against the requested object, an attacker can gain unauthorized access to other users' data or even administrative functions. Wrieden noted the difficulty of client state tracking in stateless API environments as a contributing factor, making it challenging for APIs to maintain a constant understanding of a client's authorization level for every object they try to interact with. This is a broader category that encompasses Insecure Direct Object References (IDOR).
- Broken User Authentication (BUA): As the name suggests, BUA involves the exploitation of weak or improperly implemented authentication mechanisms. Given that API keys often serve as both identification and authentication, compromising a single token can grant an attacker full impersonation capabilities. Attackers might use techniques like fuzzing (sending numerous malformed or unexpected inputs) or side-effect analysis to discover ways to bypass authentication, gain unauthorized permissions, or steal valid tokens.
- Broken Object Property Level Authorization (BOPLA): This vulnerability is a combination of excessive information exposure and mass assignment.
- Excessive Information Exposure occurs when an API returns more data than strictly necessary for a legitimate client request. For instance, an API might be asked for the length of a list but inadvertently returns the entire underlying database, with the length parameter at the bottom. An attacker inspecting the full JSON response could then access sensitive data not intended for their view.
- Mass Assignment happens when an API allows a client to update or create properties of an object that they should not have access to. If an API expects only a few parameters (e.g.,
username,email) but also processes other, hidden parameters (e.g.,is_admin=true), an attacker can exploit this by "fuzzing parameters" and discovering they can forcefully process more information than intended, potentially elevating their privileges.
- Broken Function Level Authorization (BFLA): Similar to BOLA, BFLA focuses on unauthorized access to entire functions or endpoints rather than individual objects. APIs might separate endpoints for different user roles (e.g.,
/userand/admin) but rely solely on "security through obscurity," assuming attackers won't find the/adminendpoint. If an attacker discovers such an endpoint through fuzzing and no additional authentication or authorization checks are in place, they can trivialy access privileged functions.
Attacks on Infrastructure
These attacks target the underlying servers and network supporting the API:
- Denial of Service (DoS) / Unrestricted Resource Consumption: While traditional DoS attacks flood an API with requests to consume bandwidth, API-specific DoS often involves unrestricted resource consumption. An attacker sends requests that force the API's backend server to expend excessive CPU processing power, memory, or storage. For example, by repeatedly requesting complex queries or uploading large numbers of files, an attacker can exhaust the server's resources, causing it to crash or become unresponsive, thereby denying service to legitimate users.
- Forgery Attacks / Server-Side Request Forgery (SSRF): SSRF occurs when an API endpoint is designed to request a URL provided by the client, and this functionality is not properly secured. While seemingly innocuous, an attacker can exploit this to force the API's server to make requests to internal network resources. This enables:
- Internal Service Enumeration: Mapping the internal network by requesting internal IP addresses and ports (e.g.,
192.168.1.1:3306to find a MySQL database). - Information Disclosure: Accessing sensitive internal files or web pages, potentially revealing credentials or confidential data.
- Security Mechanism Bypass: Bypassing firewalls or other access controls by using the API as a trusted intermediary to access resources that would otherwise be blocked.
- Malicious Proxy: The API server can be coerced into acting as a proxy for the attacker, allowing them to launch further attacks (e.g., DoS attacks against other targets) from the victim's infrastructure, obscuring their true origin.
Demo / Proof of Concept
▶ Watch: Core conclusions: security is key, awareness, build security in (22:00)
Wrieden provided a compelling case study to illustrate the "attacks on developers" category, focusing on the popular API development platform, Postman. Postman is widely used as a public API network, allowing developers to build, test, and share APIs within a community. It offers a valuable resource for integrating with public APIs (like Twitter/X) and also for sharing custom-built APIs.
The speaker's discovery originated from a personal endeavor to understand the Telegram API. While searching Postman's public repositories, he found numerous instances where developers had inadvertently exposed highly sensitive information. Specifically, he found Telegram bot tokens and chat IDs left in plain text within public Postman workspaces. With these two pieces of information, an attacker could trivially send messages to the associated Telegram channels, gaining unauthorized control over the bot's functionality.
The problem extended far beyond Telegram. Wrieden reported finding Google OAuth keys and Gmail API keys, granting potential access to email accounts and other Google services. Even more concerning were workspaces containing keys for Salesforce, LinkedIn, and Dropbox, all bundled together. These were often found in workspaces titled "my workspace" or "testing environment," indicating that developers, while testing their API integrations, had left critical credentials embedded in publicly accessible collections. The implication was severe: if a developer's API key identifies and authenticates them across multiple services, its exposure creates a cascading supply chain problem.
A significant aggravating factor was that many of these publicly available Postman workspaces, containing sensitive credentials, were indexed by Google. This meant that simple Google searches, such as "Gmail API site:postman.com," could directly lead threat actors to repositories brimming with exposed keys.
Upon discovering these widespread vulnerabilities, Wrieden's company, Cyjax, initiated a responsible disclosure process with Postman in October 2022. Wrieden commended Postman for being "extremely receptive and cooperative." Recognizing the severity of the issue, Postman acted swiftly to address the problem. As a result, the prevalence of such exposed credentials has "massively reduced." Postman implemented a Secret Scanner feature, designed to automatically detect and flag sensitive information like API keys within workspaces before they are inadvertently made public. This proactive measure significantly enhanced the security posture for all Postman users.
Defensive Implications
▶ Watch: Q&A: Bridging developer and security teams for proactive security (26:30)
The insights from Joe Wrieden's talk offer a critical roadmap for defenders, emphasizing that API security must be integrated at every stage of the development lifecycle, not as an afterthought.
- Embrace Security by Design: The most fundamental implication is the need to embed security considerations from the initial design phase of any API project. Whether it's a small internal API or a large public-facing service, security must be built in from the initial stages. This proactive approach helps prevent the reactive scramble to fix vulnerabilities later, which is often more costly and less effective.
- Secure API Key Management: Given that API keys often serve as both identification and authentication, their secure handling is paramount. Defenders must enforce strict policies for the generation, storage, and rotation of API keys. This means avoiding hardcoding keys, using secure credential management systems, and ensuring that keys are never exposed in public repositories, logs, or client-side code. Developers must be educated to treat API keys with the same level of care as personal passwords.
- Robust Authorization and Authentication: Implement rigorous authorization checks at every level. For Broken Object Level Authorization (BOLA) and Broken Function Level Authorization (BFLA), ensure that every API request verifies not only the user's identity but also their authorization to access the specific resource or function being requested. Avoid relying on "security through obscurity" for sensitive endpoints. For Broken User Authentication (BUA), employ strong authentication mechanisms, multi-factor authentication where applicable, and robust token management.
- Validate All Inputs and Outputs: To counter Broken Object Property Level Authorization (BOPLA), rigorously validate both incoming request parameters and outgoing API responses. Implement strict schemas to prevent mass assignment by only accepting and processing expected parameters. Similarly, sanitize and filter all data returned by the API to prevent excessive information exposure, ensuring clients only receive the data they are explicitly authorized and require.
- Mitigate Infrastructure Attacks:
- Denial of Service (DoS): Implement rate limiting, throttling, and robust input validation to prevent unrestricted resource consumption. Monitor API usage for anomalies that might indicate a DoS attack.
- Server-Side Request Forgery (SSRF): If an API needs to fetch external resources based on a URL, implement strict whitelisting of allowed domains and protocols. Never allow user-supplied URLs to directly access internal network resources. Employ network segmentation and egress filtering to prevent the API from making unauthorized outbound connections.
- Developer Education and Awareness: The "attacks on developers" category highlights the critical need for continuous security training for all developers. This includes teaching them about common API vulnerabilities, secure coding practices, and the dangers of exposing sensitive credentials in development environments or public platforms like Postman. Fostering a security-aware culture where developers feel empowered to address security is crucial, breaking down traditional silos between development and security teams.
- Utilize Security Tools and Responsible Disclosure: Leverage security features offered by development platforms, such as Postman's Secret Scanner, to automatically detect and prevent credential leaks. Furthermore, organizations should maintain open channels for responsible communication with security researchers. As Wrieden's experience with Postman demonstrated, constructive engagement can lead to rapid remediation and significant improvements in overall security.
Key Takeaways
- API Security is Foundational: APIs are indispensable, and their security is not an optional add-on but a critical requirement for protecting data and maintaining operational integrity in the modern digital landscape.
- "Broken Brothers" Dominate Code Vulnerabilities: The OWASP Top 10 API Security list highlights critical code-level flaws like Broken Object Level Authorization (BOLA), Broken User Authentication (BUA), Broken Object Property Level Authorization (BOPLA), and Broken Function Level Authorization (BFLA), which demand rigorous authorization and authentication checks.
- Infrastructure is a Key Target: APIs can be leveraged for Denial of Service (DoS) through unrestricted resource consumption and Server-Side Request Forgery (SSRF) to enumerate internal networks, disclose sensitive information, or act as malicious proxies.
- Developers are an Attack Vector (Indirectly): Unintentional exposure of API keys and credentials in public development environments, as seen in the Postman case study, constitutes a significant risk, emphasizing the need for developer education and secure practices.
- Secure API Key Management is Paramount: API keys act as both identification and authentication; therefore, generating, storing, and handling them securely is vital to prevent impersonation and unauthorized access.
- Proactive Security and Collaboration are Essential: Implementing security by design, fostering a security-aware development culture, utilizing security tools like secret scanners, and engaging in responsible disclosure with security researchers are crucial for robust API defense.
About the Speaker(s)
Joe Wrieden is an Intelligence Analyst at Cyjax, a company specializing in threat intelligence. With a background that includes working within UK policing's cybercrime unit, Joe brings practical experience in combating cyber threats. He is a recent computer science graduate from the University of York, where he developed a strong foundation in technical security. His professional experience spans threat intelligence, penetration testing, and security research. Joe's research interests include tracking threat actors, exploring emerging technologies, and analyzing blockchain security, topics he frequently discusses. His expertise underscores the critical need for understanding and mitigating vulnerabilities in pervasive technologies like APIs.
Reviews
Dr. Zero (Offensive Security Researcher) — WEAK
This is a book report on the OWASP API Security Top 10 dressed up as a conference talk. The only 'research' was dorking Postman public workspaces for hardcoded keys—a problem we've known about since the dawn of version control.
Heather Calloway (CISO) — SOLID
This is a competent, well-executed primer on API risk that grounds standard OWASP vulnerabilities in real-world developer behaviors. While it won't rewrite the playbook for a mature AppSec program, the findings on credential leakage in public Postman workspaces are highly relevant. Send this to your product security teams to justify tighter controls on developer environments.