Business Logic

Uncover the details of Pynt's security tests for business logic vulnerabilities in our documentation! Learn how Pynt safeguards against critical business logic threats.

Intro

Business logic API attacks refer to a type of security threat where an attacker exploits vulnerabilities in the underlying logic of an API to achieve unauthorized access or manipulate data within a business application.

What are the common mistakes done by developers ?

In most cases Business logic issues happen when authorization is not enforced through all the flows of the application. Modern applications usually assign a non guessable identifiers to users and resources.

Consider the following example:

def get_profile(self, getprofile_request, context):
    cursor, conn = connection_to_sql(f"GET_PROFILE_BL {getprofile_request}")
    cursor.execute('select * from profiles where uid=?',(getprofile_request.uid,))
    p = cursor.fetchone()

The function get_profile accepts the User ID as uid and directly querying the database to get this user's profile without any validation that the logged in user is the same user that is represented by the uid.

How can I fix Business Logic issues ?

Ensure that only authorized users can access the API and that access is granted on a need-to-know basis. Use strong authentication methods such as multi-factor authentication and implement authorization checks at the API endpoint level.

Test cases in this category:

These test cases test the enforce of authorization between user identifiers, resource identifiers and the actual logged in users on APIs that read user related data

These test cases test the enforce of authorization between user identifiers, resource identifiers and the actual logged in users on APIs that write user related data

This test case try to guess values of user Identifiers with a numeric structure

Last updated