APIs don't lie; they just overshare.
That’s the golden rule I’ve learned during my API Security journey. Recently, as part of the CyberSafe API Security Training, I’ve been working with VAmPI (Vulnerable API). It’s an intentionally broken API designed to help security researchers practice identifying the OWASP Top 10 vulnerabilities.
In Part 1 of this series, I’m going to document exactly how I set up my lab environment and exploited three critical vulnerabilities: BOPLA, BOLA, and BFLA.
I will also explain the specific strategies developers need to implement to address them.
To simulate a real-world scenario, I used a hybrid approach: running the vulnerable server on my Windows host via Docker and attacking it from my Kali Linux VM.
I used Docker to host the VAmPI server. The standard run command works, but I added specific flags to make the testing experience smoother (specifically extending the token life so I didn't have to keep logging in).
Run this in your terminal:
docker run -d -e vulnerable=1 -e tokentimetolive=18000 -p 5000:5000 erev0s/vampi:latest
Since I’m attacking from a Kali VM, I couldn't use localhost to reach the container. I needed my Windows machine's local IP.
VAmPI comes with an openapi3.yml file. I imported this directly into Postman. This automatically generated a collection of every available endpoint, effectively a roadmap of the entire application.

When you first launch the VAmPI Docker container, the database is completely empty. We cannot test for data leaks if there is no data to leak. Before we launch any attacks, we need to populate the database and create our own "Mel" identity.
We need to create some dummy users to act as our victims. The developers included a specific endpoint for this purpose.

Now the system contains default users like name1 and admin.
We need a valid account to interact with the API. Let's create a standard user that we will use to launch our attacks.

VAmPI uses JWT (JSON Web Tokens) for security. To access protected endpoints, we need to log in and retrieve that token.

Copy that auth_token (without the quotes). We need to configure Postman to send this token with future requests.
Now we are authenticated and ready to begin the assessment.
Formerly known as "Mass Assignment," this vulnerability happens when an API blindly trusts the data sent by the client and binds it directly to internal code variables.
I started with the registration endpoint POST /users/v1/register. A standard request includes a username, password, and email. I wanted to verify if I could force the application to grant me administrative privileges.
I modified the JSON body to include "admin": true.
Request:

Result: The API returned 200 OK. When I checked the user details later using the debug endpoint, the admin flag was indeed set to true. I successfully escalated my privileges simply by adding the parameter to the request body.
To fix Mass Assignment, you must stop binding public input directly to internal database objects.
While analyzing the API definition, I noticed an endpoint labeled GET /users/v1/_debug. This relates to the "Excessive Data Exposure" side of BOPLA.
I sent a simple GET request to this endpoint. The API returned the entire user object from the database, including the plaintext passwords for every user in the system.
Response:

This represents a critical failure. I obtained full system credentials without needing to perform any complex attacks; the API simply provided them.
The goal is to ensure the API only returns the specific data the client needs, and nothing more.
This is currently the #1 vulnerability on the OWASP API Security list. It occurs when the API validates the user's identity but fails to validate whether they are authorized to access a specific resource.
To test this, I established a control scenario:

I then sent a GET request to /books/v1/MelsSecretDiary.
Request: GET {{baseUrl}}/books/v1/MelsSecretDiary
Result: The API returned the book details and the secret content. Even though I was logged in as a different user, the API did not check if I owned the book.

Authentication (who you are) is not the same as Authorization (what you can do).
Finally, I tested for vertical privilege escalation, where a standard user performs administrative actions.
I identified an endpoint used to change passwords: PUT /users/v1/{username}/password.
I logged in as a standard user (name2) but targeted the admin's account (Mel) in the URL.

Request: PUT /users/v1/Mel/password
Body: {"password": "UpdatedByUser2"}
Auth: Bearer Token of user2 (Standard User)
Result: The server returned 204 No Content (Success). I was able to log out and log back in as the Admin using the new password. The API failed to check if my standard user had the permission to modify Mel's account.

This requires strict Role-Based Access Control (RBAC).
We have successfully exploited Mass Assignment, Excessive Data Exposure, BOLA, and BFLA, all within a single vulnerable application. These findings highlight why functional testing alone is insufficient; an API can work perfectly while still being completely insecure.
In Part 2, I’ll continue the assessment by hunting for the remaining OWASP Top 10 vulnerabilities.
Stay tuned, and remember: secure your APIs, or someone else will test them for you!