OWASP Top 10 API Security Vulnerabilities | Curity (2024)

On this page

Many threats face modern software applications. It’s smart to keep updated on the latest exploits and security vulnerabilities; having benchmarks for such vulnerabilities is paramount to ensure application security before an attack occurs.

The Open Web Application Security Project (OWASP) is a trusted nonprofit foundation that publishes software security analysis. The group is well-known for its yearly roundup of top web application vulnerabilities. Since 2019, they also release an API security vulnerabilities list as well.

As the value of APIs increases in our daily lives, these touchpoints become more vulnerable to attack. Below, we highlight the latest OWASP top 10 API security vulnerabilities list for 2023, and expand on what actions API providers can take to address each insecurity.

These actions boil down to a few basic security strategies. We’ll see that most of these vulnerabilities can be mitigated by implementing the following approaches:

  • Use an API gateway.
  • Use access tokens and make sure to audit them rigorously.
  • Use claims to simplify authorization. If the token has enough data to authorize on, then the logic becomes simpler in the API.
  • Use PPID ( Pairwise Pseudonym Identifiers ) to avoid leaking personally identifiable information to external parties, even in the tokens.

1. Broken Object Level Authorization (BOLA)

APIs tend to expose endpoints that handle object identifiers, creating a wide attack surface of Object Level Access Control issues. Object level authorization checks should be considered in every function that accesses a data source using an ID from the user. - OWASP

Since APIs enable access to objects, if authorization is broken there is a wide attack area. Thus, authorization to API-accessible objects must be secured.

Solution: Use an API gateway and implement object-level authorization checks. Require access tokens to permit access, and only allow access to those with the proper authorization credentials.

2. Broken User Authentication (BUA)

Authentication mechanisms are often implemented incorrectly, allowing attackers to compromise authentication tokens or to exploit implementation flaws to assume other user's identities temporarily or permanently. Compromising a system's ability to identify the client/user, compromises API security overall. - OWASP

Another common API vulnerability is the use of illegitimate tokens to gain access to endpoints. Authentication systems themselves may be compromised, or expose an API key accidentally. Attacks can exploit such authentication tokens to gain access.

Solution: Secure user authentication, and only ensure trusted users are authenticated. Go beyond simple API keys with OAuth flows. Always consider the type of access. If it’s machine to machine access, consider adding additional layers of security such as Mutual TLS together with OAuth MTLS Sender Constrained Tokens to ensure that clients don’t misbehave and pass tokens to the wrong party.

3. Broken Object Property Level Authorization (BOPLA)

This category combines API3:2019 Excessive Data Exposure and API6:2019 - Mass Assignment, focusing on the root cause: the lack of or improper authorization validation at the object property level. This leads to information exposure or manipulation by unauthorized parties. - OWASP

It’s easy to publish a suite of endpoints without itemized restrictions. More often than not, however, not all functions apply to all users. The more data you unnecessarily expose, the more you unnecessarily place yourself at risk.

Solution: As a rule of thumb, limit data exposure to only trusted parties who need it. Ensure what is returned is only accessible by those with correct privileges. Limit API response payloads to reduce exposure. By using OAuth Scopes and Claims, developers can delineate exactly who is eligible to access what. Claims can contain details about what parts of the data should be allowed to access. As an added benefit, the API code becomes simpler and more maintainable when access control is structured the same way in all APIs.

4. Unrestricted Resource Consumption

Satisfying API requests requires resources such as network bandwidth, CPU, memory, and storage. Other resources such as emails/SMS/phone calls or biometrics validation are made available by service providers via API integrations, and paid for per request. Successful attacks can lead to Denial of Service or an increase of operational costs. - OWASP

DoS attacks are a common brute force method used by black hats to overload a server and effectively snuff out a server’s uptime. If an API has no set limitations on the number of resources that can be called, it is wide open to a detrimental attack.

Solution: Put rate limits on APIs using an API gateway or management solution. Put restrictions on responses, and implement things like filtering and pagination.

5. Broken Function Level Authorization (BFLA)

Complex access control policies with different hierarchies, groups, and roles, and an unclear separation between administrative and regular functions, tend to lead to authorization flaws. By exploiting these issues, attackers can gain access to other users’ resources and/or administrative functions. - OWASP

OWASP highlights a common pain point for software developers: access control is difficult to implement properly. Teams working on in-house solutions rarely get it right. Exact administrative levels must be consistently defined across a platform and must accurately reflect organizational hierarchies.

Solutions: Adopt OpenID Connect to help standardize user identity creation and maintenance. Avoid in-house development, and outsource access management systems to specialized tooling. Developers can also mitigate this vulnerability by adopting Scopes and Claims. By baking such criteria into an OAuth process, API providers create more user-specific access restrictions that tie identity to the requesting party. This enables more confirmed validated assertions. Also, Claims simplify the implementation of the API. Since the token carries more data, the API simply has to look and see, is Alice allowed to do Action 1?

6. Unrestricted Access to Sensitive Business Flows

APIs vulnerable to this risk expose a business flow - such as buying a ticket, or posting a comment - without compensating for how the functionality could harm the business if used excessively in an automated manner. This doesn't necessarily come from implementation bugs. - OWASP

An attacker who authenticates and calls an API in an automated manner could gain ownership of many business resources, and prevent other users from accessing them.

Solutions: Act like a hacker to think through threats to the business. For such endpoints, use authorization rules to prevent users from creating too many resources within a time period. Use multi-factor authentication before allowing API access, to ensure human interaction, and to prevent unauthorized API access from scripts.

7. Server Side Request Forgery

Server-Side Request Forgery (SSRF) flaws can occur when an API is fetching a remote resource without validating the user-supplied URI. This enables an attacker to coerce the application to send a crafted request to an unexpected destination, even when protected by a firewall or a VPN. - OWASP

This highlights that any input to APIs must be treated with care, and considered dangerous until proven otherwise. Even when a valid API access token is provided, a malicious user should not be able to trick the API into calling untrusted locations. Using even a cheap VPN can help mask an attacker's true location, making it even more difficult to trace such malicious activities.

Solutions: Base solutions on OAuth and OpenID Connect designs, where most URIs are configured in backend components. When user-supplied URIs such as callback endpoints are supplied, they are validated against a whitelist.

8. Security Misconfiguration

APIs and the systems supporting them typically contain complex configurations, meant to make the APIs more customizable. Software and DevOps engineers can miss these configurations, or don't follow security best practices when it comes to configuration, opening the door for different types of attacks.

This guideline by OWASP is rather all-encompassing, as the chance for security misconfiguration is high. Many little details could put your platform at risk. For example, returning sensitive information from malformed requests could be eye-opening for black hats with ulterior motives.

Solutions: A general takeaway here is not to rely on default configurations. Check with your management or gateway provider and ensure they cater to your specific application requirements. Do not insert sensitive information in error messages. Also, use Pairwise Pseudonyms in tokens to not leak identity data outside the system. This way, no client can collude with another client to figure out who a user is.

9. Improper Inventory Management

APIs tend to expose more endpoints than traditional web applications, making proper and updated documentation highly important. A proper inventory of hosts and deployed API versions also are important to mitigate issues such as deprecated API versions and exposed debug endpoints. - OWASP

It is important to keep versions and documentation up-to-date; not only for the sake of developer experience but for your security as well.

Solutions: Plan your versions and API deprecation timelines ahead of the release. Do not let old API versions continue to function. Synchronize documentation with live API endpoints and consider using an API Specification as a source of truth.

10. Unsafe Composition of APIs

Developers tend to trust data received from third-party APIs more than user input, and so tend to adopt weaker security standards. In order to compromise APIs, attackers go after integrated third-party services instead of trying to compromise the target API directly. - OWASP

A compromised third-party API could potentially provide dangerous input to your API, such as malicious strings that lead to unexpected actions later. An example is a specially constructed string that results in SQL injection, to return unauthorized data to an attacker.

Solutions: Always use an API Gateway. Do not allow SQL and untrusted data types as accepted data formats. Monitor API requests from trusted parties for unusual behavior. Another option is to temporarily suspend accounts that make strange requests.

What Are The Implications for Identity Control?

Following common vulnerability benchmarks helps platform architects arm systems to stay one step ahead of API security threats. Since APIs can allow access to Personally Identifiable Information (PII), ensuring security for such services is paramount for not only business stability, but to meet regulations like GDPR.

What’s interesting is that the top issues on OWASP’s list involve the improper use of identity — or the absence of an identity strategy altogether. A better identity emphasis won’t solve every issue here, but developing with identity in mind, and having ample evidence to prove assertions, is critical for ensuring data requesters have the proper authority.

Thankfully, providers using OAuth and OpenID Connect can delegate identity, utilizing Scopes and Claims to enable a platform-wide trust. To avoid OWASP’s vulnerability list, always use an API Gateway combined with the Phantom Token Approach for OAuth tokens.

OWASP Top 10 API Security Vulnerabilities | Curity (1)

Curity

Join our Newsletter

Get the latest on identity management, API Security and authentication straight to your inbox.

Start Free Trial

Try the Curity Identity Server for Free. Get up and running in 10 minutes.

Start Free Trial

  1. Home
  2. Resources
  3. API Security
  4. Top 10 API Security Vulnerabilities According to OWASP

Was this helpful?

OWASP Top 10 API Security Vulnerabilities | Curity (2024)

FAQs

Which is the top OWASP API vulnerability? ›

OWASP API Security Top 10 Vulnerabilities (in order of severity)
  • API 06:2023 — Unrestricted access to sensitive business flows.
  • API 07:2023 — Server side request forgery.
  • API 08:2023 — Security misconfiguration.
  • API 09:2023 — Improper inventory management.
  • API 10:2023 — Unsafe consumption of APIs.

What are the security risks of API? ›

Common API security risks include data breaches, unauthorized access due to weak authentication measures, exposure of sensitive data through insecure endpoints, and system disruptions from targeted API attacks (injection or DoS attacks).

What are vulnerabilities in API? ›

Broken Object-Level Authorization is one of the most common API vulnerabilities. It occurs when an API fails to validate a user's authorization to access certain data objects. This vulnerability could allow an unauthorized user to access, manipulate, or delete data that they should not have access to.

What is API OWASP? ›

The Open Web Application Security Project (OWASP) puts together a list of the biggest security risks for application programming interfaces (APIs).

What is the most secure API? ›

OAuth 2.0: Consider using OAuth 2.0, a widely adopted authorization framework that provides robust authentication for both applications and users. API keys: Implement API keys for simpler client authentication.

What is the NIST for API security? ›

API security is an important aspect of adhering to the NIST 800-53 controls, as it plays a crucial role in safeguarding sensitive information, preventing unauthorized access, and mitigating potential cyber threats.

What is the most difficult API vulnerability to uncover? ›

The most difficult API vulnerability to uncover often involves complex authentication and authorization issues, such as flaws in token-based authentication mechanisms like JWT (JSON Web Tokens).

What are the types of API security? ›

Understanding API Security
  • SOAP APIs (1998-2010). Simple Objects Access Protocol (SOAP) APIs use digital signatures and encryption of the XML-formatted data to apply security at the message level. ...
  • REST APIs (2010-now). ...
  • GraphQL APIs (2020-future) GraphQL is an emerging query language for APIs.

What are common examples of API attacks? ›

  • What is an API Attack. ...
  • Broken Access Control. ...
  • DDoS attack. ...
  • SQL Injection Attacks. ...
  • Man in the Middle (MITM) ...
  • Excessive Data Exposure. ...
  • Improper Assets Management. ...
  • Unencrypted Communications.

How to ensure API security? ›

API security checklist: 12 best practices for securing APIs
  1. Encryption.
  2. Authentication.
  3. OAuth & OpenID Connect.
  4. Call security experts.
  5. Monitoring: audit, log, and version.
  6. Share as little as possible.
  7. Secure APIs with throttling and quotas.
  8. Data validation.
Jul 8, 2024

What is Owasp Enterprise security API? ›

ESAPI (The OWASP Enterprise Security API) is a free, open source, web application security control library that makes it easier for programmers to write lower-risk applications. The ESAPI libraries are designed to make it easier for programmers to retrofit security into existing applications.

What are safe APIs? ›

Introduction. SAFE offers a series of REST APIs that allow customers and partners to extend and leverage existing investments in other software and systems by synchronizing and sharing data between the systems. The SAFE REST API allows third-party software and systems to extract information from the SAFE platform.

Which API request is more secure? ›

HTTP GET method is less secure than HTTP POST method for requests to be sent. Because in requests to be sent with the HTTP GET method, it should not be used if it contains sensitive data, since all data is in a way that everyone can see.

What is the most powerful API? ›

Most Popular APIs this year
  • #1. Salesforce. The Salesforce Platform APIs provide a range of services to developers, enabling them to integrate Salesforce data and functionality into their applications. ...
  • #2. Microsoft Graph. ...
  • #3. Slack. ...
  • #4. PayPal. ...
  • #5. MongoDB. ...
  • #6. Zoho CRM. ...
  • #7. Cisco Meraki. ...
  • #8. Pipedrive API.

Which API deals with authorization API top 10 1 and 2? ›

OWASP Top 10 for API Risks
  • API1:2023 – Broken Object Level Authorization. ...
  • API2:2023 – Broken Authentication. ...
  • API3:2023 – Broken Object Property Level Authorization. ...
  • API4:2023 – Unrestricted Resource Consumption. ...
  • API5:2023 – Broken Function Level Authorization. ...
  • API6:2023 – Unrestricted Access to Sensitive Business.
Jun 28, 2024

Top Articles
GUIDE: How to Run 10km Without Training — Steemit
Storage Space Running Out message, but there are no files on local storage
Unit 30 Quiz: Idioms And Pronunciation
Food King El Paso Ads
Quick Pickling 101
Visitor Information | Medical Center
Limp Home Mode Maximum Derate
From Algeria to Uzbekistan-These Are the Top Baby Names Around the World
Culver's Flavor Of The Day Wilson Nc
Craigslist Mexico Cancun
Obituaries
Tabler Oklahoma
Find The Eagle Hunter High To The East
Dumb Money
Diablo 3 Metascore
Dr Manish Patel Mooresville Nc
Houses and Apartments For Rent in Maastricht
Inside the life of 17-year-old Charli D'Amelio, the most popular TikTok star in the world who now has her own TV show and clothing line
R Cwbt
Nurse Logic 2.0 Testing And Remediation Advanced Test
The Blind Showtimes Near Amc Merchants Crossing 16
Popular Chinese Restaurant in Rome Closing After 37 Years
Cincinnati Adult Search
Reviews over Supersaver - Opiness - Spreekt uit ervaring
Play Tetris Mind Bender
Rogue Lineage Uber Titles
Horn Rank
Nottingham Forest News Now
Yu-Gi-Oh Card Database
Vadoc Gtlvisitme App
Dtlr On 87Th Cottage Grove
Publix Daily Soup Menu
Syracuse Jr High Home Page
Heavenly Delusion Gif
Louisville Volleyball Team Leaks
The Bold And The Beautiful Recaps Soap Central
Case Funeral Home Obituaries
Page 5662 – Christianity Today
Raising Canes Franchise Cost
Wattengel Funeral Home Meadow Drive
Froedtert Billing Phone Number
Craigslist Central Il
Advance Auto.parts Near Me
Unblocked Games - Gun Mayhem
Tacos Diego Hugoton Ks
De boeken van Val McDermid op volgorde
Research Tome Neltharus
Jasgotgass2
Obituary Roger Schaefer Update 2020
Island Vibes Cafe Exeter Nh
Selly Medaline
Latest Posts
Article information

Author: Aracelis Kilback

Last Updated:

Views: 5709

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Aracelis Kilback

Birthday: 1994-11-22

Address: Apt. 895 30151 Green Plain, Lake Mariela, RI 98141

Phone: +5992291857476

Job: Legal Officer

Hobby: LARPing, role-playing games, Slacklining, Reading, Inline skating, Brazilian jiu-jitsu, Dance

Introduction: My name is Aracelis Kilback, I am a nice, gentle, agreeable, joyous, attractive, combative, gifted person who loves writing and wants to share my knowledge and understanding with you.