<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Md Minhaj on Medium]]></title>
        <description><![CDATA[Stories by Md Minhaj on Medium]]></description>
        <link>https://medium.com/@Darkness_Security?source=rss-88376498b6d7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NWJ-cM9V6HPxA4dP5WPrbQ.png</url>
            <title>Stories by Md Minhaj on Medium</title>
            <link>https://medium.com/@Darkness_Security?source=rss-88376498b6d7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 12:18:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Darkness_Security/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[VAPI — Vulnerable Adversely Programmed Interface]]></title>
            <link>https://medium.com/@Darkness_Security/vapi-vulnerable-adversely-programmed-interface-8ef6a3040fba?source=rss-88376498b6d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ef6a3040fba</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[api-penetration-testing]]></category>
            <category><![CDATA[vapi]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Md Minhaj]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 06:16:27 GMT</pubDate>
            <atom:updated>2026-11-10T06:16:27.623Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*in_wp7pRwo1P_YH56hNb3g.jpeg" /></figure><p><strong>Target: roottusk/vapi (OWASP API Security Top 10–2019 practice lab)</strong></p><p><strong>Repository: </strong><a href="https://github.com/roottusk/vapi"><strong>https://github.com/roottusk/vapi</strong></a></p><p><strong>Environment: Local Docker instance (docker-compose up -d)</strong></p><h3>Scope &amp; Methodology</h3><p>Scope: the vAPI application running locally via docker-compose up -d, its REST API under /vapi/, the accompanying Android APK (API3 exercise), and the three bonus ‘Arena’ exercises (JustWeakToken, ServerSurfer, StickyNotes).</p><p><strong>Methodology:</strong></p><p>manual black-box and grey-box testing against each OWASP API Security Top 10 (2019) category using the lab’s own Postman collection (vAPI.postman_collection.json) and environment file, Burp Suite (Repeater, Intruder, and the JWT Editor extension) for request crafting and brute-forcing, an Android emulator for the mobile-backed exercise, and the application’s own CTF flag mechanism to confirm successful exploitation of each issue.</p><p><strong><em>VAPI-API 1: Broken Object Level Authorization (BOLA) on Get/Update User endpoint</em></strong></p><p><strong>Bug Type: </strong>Broken Object Level Authorization (BOLA) — OWASP API1:2019</p><p><strong>Severity: High</strong></p><p><strong>CVSS Score: </strong>8.1 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N)</p><p><strong>Affected Endpoint: </strong>GET/PUT /vapi/api1/user/{id}</p><p><strong>Summary</strong></p><p>The Get User and Update User endpoints take the user id directly from the URL path with no server-side check that the authenticated caller actually owns that id. Registering an account assigns a sequential numeric id (e.g. 5); simply changing the id in the path to a lower number (e.g. 1–4) returns other users’ full profile data and flags, and the same lack of checks allows PUT requests to modify other users’ profiles.</p><p><strong>Steps to Reproduce</strong></p><p>1. Register a new account; note the assigned numeric user id (e.g. id=8).</p><p>2. Authenticate and call GET /vapi/api1/user/8 — confirm it returns your own profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gan57foqvwRjcst5kkeosQ.png" /></figure><p>3. Change the id in the URL to a lower/other number, e.g. GET /vapi/api1/user/1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZB1P59SdODcBqKZvX1s-QA.png" /></figure><p>4. Observe the server returns user 1’s full profile data, including that user’s flag.</p><p>5. Repeat with a PUT request to the same endpoint using another user’s id to confirm unauthorized profile modification is also possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CGGGADAWS9kYLvvXJvhzxQ.png" /></figure><p><strong>Impact</strong></p><p>Any authenticated user can read and modify any other user’s profile data, including administrator accounts, simply by iterating over sequential IDs. This is a direct horizontal and vertical privilege-escalation issue that fully breaks per-user data isolation.</p><p><strong>Remediation</strong></p><p>● Derive the resource owner from the authenticated session/token, never trust a client-supplied path/body ID alone.</p><p>● On every object-level read/write, verify the authenticated user is the owner of (or explicitly authorized for) that specific object.</p><p>● Use non-sequential, non-guessable identifiers (UUIDs) in addition to server-side ownership checks.</p><p><strong><em>VAPI-API2: Broken Authentication — credentials exposed in app resources enable brute-force login</em></strong></p><p><strong>Bug Type: </strong>Broken User Authentication — OWASP API2:2019</p><p><strong>Severity: Critical</strong></p><p><strong>CVSS Score: </strong>9.1 (CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N)</p><p><strong>Affected Endpoint: </strong>POST /vapi/api2/user/login</p><p><strong>Summary</strong></p><p>A creds.csv file containing a list of candidate email/password pairs is present in the application’s own Resources folder (API2_CredentialStuffing). The login endpoint has no lockout, CAPTCHA, or rate limiting, so these candidate credentials can be fed into an automated Pitchfork-style brute-force attack via Burp Suite Intruder until valid pairs are identified.</p><p><strong>Steps to Reproduce</strong></p><p>1. Locate and download the API2_CredentialStuffing resource (creds.csv) shipped with the lab.</p><p>2. Split the file into emails.txt and passwords.txt: awk -F’,’ ‘{print $1 &gt; “emails.txt”; print $2 &gt; “passwords.txt”}’ creds.csv</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MFF2VzeyZbnsFfSNr_UrYA.png" /></figure><p>3. Intercept a login request in Burp Suite and send it to Intruder.</p><p>4. Configure a Pitchfork attack using emails.txt and passwords.txt as the two payload sets (disable URL-encoding on payloads).</p><p>5. Run the attack and identify the response(s) that differ from the standard failed-login response — these indicate valid credential pairs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kXHNcg6pOdkM8-6SrKS_wQ.png" /></figure><p>6. Log in with the recovered valid credentials and access the authenticated user endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_-Vl0tNKd5evIGlZaTmb4A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MaSVLSwBf4nCyOVhydMLBg.png" /></figure><p><strong>Impact</strong></p><p>An attacker with no prior access can obtain valid login credentials for real accounts purely through automated guessing against an unthrottled login endpoint, combined with credential material that should never have shipped inside the application’s own assets. This grants full account access with no authorization of any kind.</p><p><strong>Remediation</strong></p><p>● Never bundle real or realistic credential lists inside application resources, APKs, or public repositories.</p><p>● Implement rate limiting, progressive delays, and account lockout/CAPTCHA on authentication endpoints.</p><p>● Enforce multi-factor authentication for sensitive accounts.</p><p>● Monitor and alert on repeated failed-login patterns indicative of credential stuffing.</p><p><strong><em>VAPI-API3: Excessive Data Exposure — comment API leaks precise user geolocation and internal flag data</em></strong></p><p><strong>Bug Type: </strong>Excessive Data Exposure (BOPLA) — OWASP API3:2019</p><p><strong>Severity: Medium</strong></p><p><strong>CVSS Score: </strong>6.5 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N)</p><p><strong>Affected Endpoint: </strong>GET comments endpoint (vAPI Android app backend, Base URL /vapi)</p><p><strong>Summary</strong></p><p>The companion Android application (shipped in the lab’s Resources folder) talks to a comments API that returns far more data than the UI displays. Inspecting the raw traffic in Burp Suite while viewing comments shows each response includes the commenting user’s precise latitude/longitude and an internal flag value, neither of which is ever shown in the app’s own interface.</p><p><strong>Steps to Reproduce</strong></p><p>1. Install the provided APK on an Android emulator and set its Base URL to point at the lab instance (e.g. 10.0.2.2:8000/vapi on an Android Studio emulator).</p><p>2. Register a new account inside the app.</p><p>3. Proxy the app’s traffic through Burp Suite and view the comments screen.</p><p>4. Inspect the raw JSON response for the comments request and note the extra latitude, longitude and flag fields that are not rendered in the UI.</p><p>5. Post your own comment and confirm the response again leaks your own precise location data back.</p><p><strong>Impact</strong></p><p>The API leaks precise geolocation of users and an internal flag value to any client that queries the endpoint, well beyond what the application’s own UI needs or displays. In a real deployment this pattern commonly exposes PII, location/stalking risk, or internal secrets to anyone capable of intercepting API traffic.</p><p><strong>Remediation</strong></p><p>● Apply strict server-side response filtering (DTOs / response schemas) so only fields the client actually needs are ever serialized.</p><p>● Never rely on the client UI to hide sensitive fields that are still present in the raw API response.</p><p>● Treat location data as sensitive PII and only collect/return it with explicit purpose and user consent.</p><p><strong><em>VAPI-API4: Lack of Resources &amp; Rate Limiting — OTP verification can be brute-forced</em></strong></p><p><strong>Bug Type: </strong>Lack of Resources &amp; Rate Limiting — OWASP API4:2019</p><p><strong>Severity: High</strong></p><p><strong>CVSS Score: </strong>7.5 (CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)</p><p><strong>Affected Endpoint: </strong>POST OTP request + POST OTP verification endpoint</p><p><strong>Summary</strong></p><p>The OTP-based login flow generates a 4-digit numeric OTP (10,000 possible values) and places no limit on the number of verification attempts. The verification endpoint can be fuzzed through all 10,000 combinations with Burp Suite Intruder with no lockout, delay, or CAPTCHA, allowing the correct OTP to be recovered.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Request an OTP for a target phone number via the OTP-request endpoint.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xbzJ_8CAPfK6v9xWhvy7tQ.png" /></figure><p>2. Submit an incorrect OTP and observe the 403 Forbidden response used to distinguish right/wrong guesses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sDBCexkJbujY9MQmUSIqGQ.png" /></figure><p>3. Intercept the OTP-verification request in Burp Suite and send it to Intruder.</p><p>4. Configure a Sniper attack over the OTP parameter with a numeric payload list from 0000 to 9999.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z94KPAZHF1uOzvNxV_APCA.png" /></figure><p>5. Run the attack and filter responses by length/status code to isolate the one correct OTP that returns 200 OK with a valid token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bXIU3EGT7XGx_UFfdDm9_Q.png" /></figure><p><strong>Impact</strong></p><p>A 4-digit OTP with no attempt limiting can be exhausted in minutes by a single unauthenticated attacker, completely defeating the purpose of OTP-based authentication and allowing full account takeover for any phone number the attacker chooses to target.</p><p><strong>Remediation</strong></p><p>● Enforce a strict maximum number of verification attempts per OTP (e.g. 3–5), after which the OTP is invalidated and a new one must be requested.</p><p>● Add rate limiting / exponential backoff per account and per source IP on OTP verification.</p><p>● Use longer, less guessable OTPs and short expiry windows; alert on abnormal verification volume.</p><p><strong><em>VAPI-API5: Broken Function Level Authorization — unauthenticated bulk user data dump</em></strong></p><p><strong>Bug Type: </strong>Broken Function Level Authorization (BFLA) — OWASP API5:2019</p><p><strong>Severity: Critical</strong></p><p><strong>CVSS Score: </strong>8.6 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N)</p><p><strong>Affected Endpoint: </strong>GET /vapi/api5/users</p><p><strong>Summary</strong></p><p>While direct admin-style endpoints (e.g. /vapi/api5/user/admin, /vapi/api5/admin/{id}) are blocked or error out, changing the request method/path to a bulk listing function — GET /vapi/api5/users — with nothing more than a regular, low-privilege user’s token returns the full user list for the entire application, including every user’s flag.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Register a normal user via the Create User API and note the assigned low-privilege user id.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L6Pfajsx8gaPVYeqs0Btdw.png" /></figure><p>2. Authenticate as this user and confirm that accessing other individual users’ admin-style endpoints returns 403/500.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9ocMMp7VOAWAhpCIJhK76g.png" /></figure><p>3. Change the request method to GET and the path to /vapi/api5/users, still using the regular user’s token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yz9rYTBK53HgpcveUXul7Q.png" /></figure><p>4. Observe the server returns the complete list of users in the system, including administrative accounts and each user’s flag.</p><p><strong>Impact</strong></p><p>A function that should only be reachable by administrators (a full user directory dump) is reachable by any authenticated, unprivileged account. This exposes every user’s data at once, turning a single low-privilege account into a mass data-breach vector.</p><p><strong>Remediation</strong></p><p>● Implement explicit role-based access control (RBAC) and enforce it server-side on every function, not just individual-object endpoints.</p><p>● Default-deny access to bulk/listing and administrative functions; only allow verified admin roles.</p><p>● Audit all endpoints — including ones not referenced in client apps — for missing function-level checks.</p><p><strong><em>VAPI-API6: Mass Assignment on user registration allows attacker-controlled credit balance</em></strong></p><p><strong>Bug Type: </strong>Mass Assignment — OWASP API6:2019</p><p><strong>Severity: High</strong></p><p><strong>CVSS Score: </strong>7.5 (CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N)</p><p><strong>Affected Endpoint: </strong>POST /vapi/api6/user (Create User)</p><p><strong>Summary</strong></p><p>The Create User endpoint binds the entire incoming JSON body to the backend user model without a field allow-list. New accounts normally start with 0 credits, but adding an undocumented credit field to the registration payload lets an attacker set their own starting balance to any value, e.g. 5000.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Create a standard user via the Create User endpoint and confirm the account starts with 0 credits.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J1azXaGEwFwB25H7u5j80Q.png" /></figure><p>2. Send a second Create User request, adding an extra JSON field credit set to a large value (e.g. 5000).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c3o8El_2Q285_G4nrJl6Yw.png" /></figure><p>3. Query the new user’s details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j6mSzVPwFcRSTO-haN3BrA.png" /></figure><p>4. Observe the account was created with the attacker-supplied credit balance instead of the default 0, and the API6 flag is returned.</p><p><strong>Impact</strong></p><p>Any unauthenticated user can set sensitive internal account properties (here, a credit/currency balance) that should only ever be assigned by trusted server-side business logic. In a production store/wallet-style API this directly translates to financial fraud.</p><p><strong>Remediation</strong></p><p>● Never bind raw client JSON directly to the database/ORM model.</p><p>● Use an explicit allow-list (DTO) per endpoint defining exactly which fields a client may set.</p><p>● Keep sensitive fields (credit, balance, role, isAdmin) settable only by trusted server-side code paths.</p><p><strong><em>VAPI-API7: Security Misconfiguration — permissive CORS policy allows cross-origin credentialed requests</em></strong></p><p><strong>Bug Type: </strong>Security Misconfiguration — OWASP API7:2019</p><p><strong>Severity: High</strong></p><p><strong>CVSS Score: </strong>7.1 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N)</p><p><strong>Affected Endpoint: </strong>Authenticated endpoints, e.g. GET /vapi/api7/user/{id}</p><p><strong>Summary</strong></p><p>API responses include both Access-Control-Allow-Origin: * and Access-Control-Allow-Credentials: true at the same time — a combination that is explicitly dangerous, since it tells browsers that cookies/authorization headers may be sent and read by requests from any origin whatsoever. Setting an arbitrary Origin header (e.g. attacker-controlled domain) on an authenticated request still returns sensitive user data and the task flag.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Create a user and log in to obtain a valid auth token.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g6kbJ33S6Yz8oMQZSlk8yA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t_BAo6VpXVoOg40AehJ0kQ.png" /></figure><p>2. Send a request to an authenticated endpoint and inspect the response headers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VTUEOe9TucSwxMQ5g_Qwsw.png" /></figure><p>3. Note the presence of both Access-Control-Allow-Origin: * and Access-Control-Allow-Credentials: true.</p><p>4. Resend the request, adding a crafted Origin header pointing to an arbitrary external domain (e.g. <a href="https://attacker.example)./">https://attacker.example).</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*chZ8Y5Xw1xmbHO2o4HXDDA.png" /></figure><p>5. Observe the server still returns sensitive user data and the flag despite the foreign origin.</p><p><strong>Impact</strong></p><p>A malicious website visited by a logged-in victim could, in a real browser context, silently issue authenticated requests to this API and read the response, exfiltrating the victim’s private data cross-origin — a classic CSRF/CORS-based account compromise, here demonstrated directly against the API.</p><p><strong>Remediation</strong></p><p>● Never combine Access-Control-Allow-Origin: * with Access-Control-Allow-Credentials: true.</p><p>● Maintain an explicit allow-list of trusted origins and reflect only those, never a wildcard, when credentials are involved.</p><p>● Review all CORS and other security-relevant default configurations as part of every release.</p><p><strong><em>VAPI-API8: SQL Injection in login flow allows authentication bypass and secret-endpoint access</em></strong></p><p><strong>Bug Type: </strong>Injection (SQLi) — OWASP API8:2019</p><p><strong>Severity: Critical</strong></p><p><strong>CVSS Score: </strong>9.8 (CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)</p><p><strong>Affected Endpoint: </strong>POST /vapi/api8/user/login</p><p><strong>Summary</strong></p><p>The login endpoint concatenates user-supplied input directly into backend SQL queries. Submitting a basic SQL-injection payload in the login fields returns a verbose SQL syntax error confirming unsanitized input reaches the database; running a curated SQLi payload set (from PayloadsAllTheThings) through Burp Intruder identifies several payloads that return 200 OK and grant access to a protected secret endpoint with no valid credentials.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Attempt login with clearly invalid credentials and confirm a normal failed-login response.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*09wNfFVo_Y2EmaEqdDytag.png" /></figure><p>2. Submit a basic SQL-injection payload (e.g. a single quote) in the username/password field and observe a verbose SQL syntax error in the response, confirming the input reaches the query unsanitized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k62_65BB6OAsfZcCtCZJ_A.png" /></figure><p>3. Route the login request through Burp Suite Intruder using a SQL-injection payload list (e.g. PayloadsAllTheThings SQLi wordlist).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1gY_mGP0qhdHQFm3d77yIg.png" /></figure><p>4. Identify the payload(s) that return HTTP 200 instead of the expected error, indicating the authentication check was bypassed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ogPhhU3zAS6SZj-cOuGTsg.png" /></figure><p>5. Use the resulting session to access the protected GET secret endpoint and retrieve the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YggarprjdzwO2zWlSJImCA.png" /></figure><p><strong>Impact</strong></p><p>Complete authentication bypass with no valid credentials, plus access to a backend secret endpoint. SQL injection of this kind typically also permits full database read/write (data exfiltration, tampering, or destruction) depending on the query context, making this the most severe class of vulnerability in the assessment.</p><p><strong>Remediation</strong></p><p>● Always use parameterized queries / prepared statements, never string-concatenate user input into SQL.</p><p>● Apply strict input validation and type-checking on every field before it reaches the database layer.</p><p>● Return only generic error messages to clients; log verbose technical detail server-side only.</p><p>● Run regular static/dynamic analysis (SAST/DAST) to catch injection points before release.</p><p><strong><em>VAPI-API9: Improper Assets Management — deprecated v1 API lacks the rate limiting enforced on v2</em></strong></p><p><strong>Bug Type: </strong>Improper Assets Management — OWASP API9:2019</p><p><strong>Severity: High</strong></p><p><strong>CVSS Score: </strong>7.5 (CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)</p><p><strong>Affected Endpoint: </strong>POST /vapi/api9/v1/user/login (legacy, undocumented) vs. /vapi/api9/v2/user/login (current)</p><p><strong>Summary</strong></p><p>The documented, current login endpoint is v2 and correctly enforces rate limiting against PIN brute-forcing. However, simply changing v2 to v1 in the request path reaches a still-active legacy version of the same endpoint that never received the v2 rate-limiting fix, allowing an unthrottled brute-force of the login PIN.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Send a login request to the documented v2 endpoint and confirm repeated incorrect PIN attempts are rate-limited after a few tries.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3gpgrNbKrf769-tb6esG-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q24MPF_2d52ZDQ9loCCUkA.png" /></figure><p>2. Change v2 to v1 in the request path and resend incorrect PIN attempts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-n2uEiEt-Dxkuq2cJ-Dorw.png" /></figure><p>3. Observe the legacy v1 endpoint accepts unlimited attempts with no throttling.</p><p>4. Brute-force the numeric PIN via Burp Intruder against the v1 endpoint until the correct PIN is found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SV2eBjuJVgusvj2l3am-hQ.png" /></figure><p>5. Use the recovered PIN to log in successfully via the (now reachable) v2 endpoint and retrieve the flag.</p><p><strong>Impact</strong></p><p>Leaving an old, unmaintained API version reachable in production reintroduces vulnerabilities (here, brute-forceable authentication) that were already fixed in the current version, completely undermining that fix. Forgotten endpoints like this are a common and easily-overlooked route to full account compromise.</p><p><strong>Remediation</strong></p><p>● Maintain a complete inventory of every API version ever shipped and decommission old versions once superseded.</p><p>● If an old version must remain temporarily available, apply the same security controls (rate limiting, patches) as the current version, or proxy/deny it entirely.</p><p>● Use API gateways to centrally enforce consistent protections across all exposed versions.</p><p><strong><em>VAPI-API10: Insufficient Logging &amp; Monitoring — sensitive endpoint returns data with zero detection/alerting</em></strong></p><p><strong>Bug Type: </strong>Insufficient Logging &amp; Monitoring — OWASP API10:2019</p><p><strong>Severity: Medium</strong></p><p><strong>CVSS Score: </strong>5.3 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N)</p><p><strong>Affected Endpoint: </strong>Designated API10 vulnerable endpoint (per lab’s Postman collection)</p><p><strong>Summary</strong></p><p>Sending a single, direct request to the API10 endpoint immediately returns the flag, with the lab’s own hint explicitly confirming that no logging, monitoring, or alerting is in place for this (or by extension, other sensitive) activity — no advanced technique, injection, or brute-forcing is required at all.</p><p><strong>Steps to Reproduce</strong></p><p>1. Locate the API10 request in the lab’s Postman collection.</p><p>2. Send the request as-is with no modification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XCzdGv8LTNXL8-0FzmvpSg.png" /></figure><p>3. Observe the flag is returned immediately in the response, with no indication (headers, delays, lockouts) that the action was logged, flagged, or alerted on in any way.</p><p><strong>Impact</strong></p><p>Without adequate logging and monitoring, every other vulnerability in this report (credential stuffing, BOLA, injection, mass assignment, etc.) could be exploited repeatedly in production with no detection, no alerting, and no forensic trail to support incident response.</p><p><strong>Remediation</strong></p><p>● Log all authentication attempts, authorization failures, input-validation failures, and access to sensitive functions/data.</p><p>● Centralize logs and configure real-time alerting on suspicious patterns (repeated failures, anomalous access, injection indicators).</p><p>● Regularly test that logging/alerting actually fires, as part of security testing, not just that the application functions.</p><p><strong><em>VAPI-ARENA-1: [Arena: JustWeakToken] JWT role claim is trusted without signature verification, enabling privilege escalation</em></strong></p><p><strong>Bug Type: </strong>Broken Authentication / JWT Misconfiguration — OWASP API2:2019</p><p><strong>Severity: Critical</strong></p><p><strong>CVSS Score: </strong>9.4 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N)</p><p><strong>Affected Endpoint: </strong>GET Get User endpoint (Arena &gt; JustWeakToken, JWT-protected)</p><p><strong>Summary</strong></p><p>Logging in returns a JWT containing a role: user claim. Using Burp Suite’s JWT Editor extension to change this claim to role: admin and resending the (unresigned, or trivially re-signed) token causes the server to treat the requester as an administrator — the server is trusting the role claim inside the token instead of independently re-validating the user’s actual role server-side.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Log in with normal credentials and capture the issued JWT.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jCU1xpRRsDwAX9L1M2hDBg.png" /></figure><p>2. Send an authenticated request (Get User) with the token and confirm a normal, non-admin response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dKvMdGyqkBAviBcYRr1h2Q.png" /></figure><p>3. Open the request in Burp Suite Repeater with the JWT Editor extension and inspect the token payload, noting role: user.</p><p>4. Change the claim to role: admin and resend the token with the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*43i0Pga3eiaaHCl8DRumtA.png" /></figure><p>5. Observe the server accepts the modified token and returns an admin-level response and the flag.</p><p><strong>Impact</strong></p><p>An attacker with only a normal, valid account can escalate to full administrative privileges by editing an unverified or weakly-verified claim inside their own JWT — a critical authentication/authorization bypass with no need to crack any secret.</p><p><strong>Remediation</strong></p><p>● Always cryptographically verify JWT signatures server-side before trusting any claim inside the token.</p><p>● Never use token claims (role, isAdmin) as the sole source of truth — re-check the user’s actual role against the backend/database on every privileged request.</p><p>● Use strong, properly managed signing keys and prefer asymmetric algorithms (RS256/ES256).</p><p><strong><em>VAPI-ARENA-2: [Arena: ServerSurfer] Server-Side Request Forgery (SSRF) via user-controlled URL fetch</em></strong></p><p><strong>Bug Type: </strong>Server-Side Request Forgery (SSRF) — OWASP API7:2019 / API10:2023</p><p><strong>Severity: High</strong></p><p><strong>CVSS Score: </strong>8.2 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N)</p><p><strong>Affected Endpoint: </strong>GET Get Data endpoint (Arena &gt; ServerSurfer), url query parameter</p><p><strong>Summary</strong></p><p>The Get Data request takes a url GET parameter and fetches it server-side, returning the fetched content base64-encoded in the response. Supplying an external, attacker-controlled webhook URL proves the server itself performs the HTTP request and relays arbitrary content back to the requester — a full, controllable SSRF primitive.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Send the Get Data request with a known external URL (e.g. the vAPI developer’s own site) in the url parameter and confirm the base64-decoded response matches that site’s HTML, proving the fetch happens server-side.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s2LL_VWb7Pych3fzl2RthA.png" /></figure><p>2. Create a webhook at a service such as webhook.site or burp collab with a distinctive custom response body.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sfoT05jTAOZEpdRewltRZA.png" /></figure><p>3. Resend the Get Data request with the burp collab as the url parameter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*72yhG2Wl2X2DEmRBcpdFoQ.png" /></figure><p>4. Base64-decode the response and confirm it matches the custom content configured on the webhook, proving full control over what the server fetches.</p><p><strong>Impact</strong></p><p>SSRF lets an attacker use the server as a proxy to reach internal-only services (databases, admin panels, cloud metadata endpoints such as 169.254.169.254) that are not directly reachable from the internet, and in many real deployments escalates to internal port scanning, credential theft, or deeper network pivoting.</p><p><strong>Remediation</strong></p><p>● Maintain a strict allow-list of destinations the server is permitted to fetch.</p><p>● Block outbound requests to private/internal IP ranges, loopback addresses, and cloud metadata IPs at the application and network layer.</p><p>● Disable or re-validate HTTP redirects during server-side fetches.</p><p><strong><em>VAPI-ARENA-3: [Arena: StickyNotes] Stored Cross-Site Scripting (XSS) via unsanitized note content rendered as HTML</em></strong></p><p><strong>Bug Type: </strong>Injection / Cross-Site Scripting (XSS) — OWASP API8:2019</p><p><strong>Severity: Medium</strong></p><p><strong>CVSS Score: </strong>6.1 (CVSS 3.1: AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N)</p><p><strong>Affected Endpoint: </strong>POST Store a Note / GET Get Notes (Arena &gt; StickyNotes)</p><p><strong>Summary</strong></p><p>The Store a Note endpoint accepts free-text note content with no sanitization, and the Get Notes endpoint serves that content back with a Content-Type: text/html response header, causing any HTML/JavaScript submitted in a note to execute when the response is viewed directly in a browser — a classic stored XSS.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Send a Store a Note request with a normal text body and confirm it is saved successfully.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3QPdJuBEmh16sMOjQZPTQg.png" /></figure><p>2. Send a second Store a Note request where the note content is: &lt;img src=x onerror=prompt()&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0PMyJawob3SBX9ng91p6w.png" /></figure><p>3. Send a Get Notes request and observe the response Content-Type header is text/html, with the injected script present unescaped in the body.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*emlefHFyWnf5xh6AiTQp9w.png" /></figure><p>4. Open the Get Notes URL directly in a browser and confirm the JavaScript alert executes, proving the payload runs as code rather than being treated as inert text.</p><p><strong>Impact</strong></p><p>Stored XSS allows an attacker to execute arbitrary JavaScript in the browser context of any user who views the affected note, enabling session/token theft, UI redressing, or further client-side attacks against victims who simply read content served by the API.</p><p><strong>Remediation</strong></p><p>● Always HTML-encode/escape user-supplied content before rendering it as HTML.</p><p>● Use a templating engine or framework with auto-escaping enabled by default.</p><p>● Serve API responses as application/json rather than text/html unless HTML output is explicitly intended and sanitized.</p><p>● Implement a Content Security Policy (CSP) to limit the impact of any XSS that slips through.</p><h3>Conclusion</h3><p>vAPI successfully demonstrates the full OWASP API Security Top 10 (2019) list in a self-contained, reproducible lab, plus three additional real-world-flavoured bonus exercises. Findings ranged from Medium-severity hygiene issues (excessive data exposure, missing logging) to Critical, fully exploitable authentication bypasses (SQL injection, JWT role tampering) and a function-level authorization failure allowing complete user-base enumeration. The recurring root cause across most findings is identical to what is seen across the industry: the server trusts client-supplied input — object IDs, extra JSON fields, token claims, URL path versions, or Origin headers — instead of independently validating it against the authenticated session and backend state. Addressing that single pattern, consistently, across every endpoint and every API version still in production, would remediate the large majority of issues found here.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ef6a3040fba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DVAPI — Damn Vulnerable API]]></title>
            <link>https://medium.com/@Darkness_Security/dvapi-damn-vulnerable-api-ecaa97911819?source=rss-88376498b6d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecaa97911819</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[owasp-api-security-top-10]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[api-hackin]]></category>
            <category><![CDATA[web-hacking]]></category>
            <dc:creator><![CDATA[Md Minhaj]]></dc:creator>
            <pubDate>Sat, 07 Nov 2026 13:15:28 GMT</pubDate>
            <atom:updated>2026-11-07T13:15:28.138Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZFVqG9Gv2i44ADNJY3SwtA.jpeg" /></figure><p>Target: payatu/DVAPI (OWASP API Security Top 10–2023 practice lab)</p><p>Repository: <a href="https://github.com/payatu/DVAPI">https://github.com/payatu/DVAPI</a></p><p>Environment: Local Docker instance (http://127.0.0.1:3000)</p><p>Report Date: 04 November 2026</p><h3>Scope &amp; Methodology</h3><p>Scope: the DVAPI application running locally via docker compose up — build, accessed at <a href="http://127.0.0.1:3000,">http://127.0.0.1:3000,</a> including its REST API, Swagger endpoint, and the accompanying Postman collection.</p><p>Methodology: manual black-box and grey-box testing against each OWASP API Security Top 10 (2023) category, using Postman/curl for request and the application’s own CTF flag mechanism to confirm successful exploitation of each issue.</p><h3><strong>Detailed Findings</strong></h3><p><strong><em>DVAPI-01: Broken Object Level Authorization (BOLA) on /api/getNote via username parameter</em></strong></p><p><strong>Bug Type: </strong>Broken Object Level Authorization (BOLA) — OWASP API1:2023</p><p><strong>Severity: High</strong></p><p><strong>CVSS Score: </strong>8.1 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N)</p><p><strong>Affected Endpoint: </strong>GET /api/getNote?username={username}</p><p><strong>Summary</strong></p><p>The getNote endpoint returns a user’s saved progress note by taking the username directly as a query parameter, with no server-side check that the requester actually owns that username. Any authenticated user can swap the username value to another account (including admin) and read that account’s private note.</p><p><strong>Steps to Reproduce</strong></p><p>1. Log in as a normal low-privilege user and capture a valid session/auth token.</p><p>2. Send: GET /api/getNote?username=&lt;your_username&gt; — confirm you get your own note back.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5rJrQjJ0C-hHbbye0c8DbQ.png" /></figure><p>3. Replace the username value with another user’s name, e.g. admin: GET /api/getNote?username=admin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TXUBvjilN5-MbdQZVJWbyg.png" /></figure><p>4. Observe that the server returns admin’s note content without any ownership/authorization check</p><p><strong>Impact</strong></p><p>Any authenticated attacker can read the private notes of every other user, including admin, simply by guessing or enumerating usernames. This is a direct horizontal and vertical privilege-escalation / data-disclosure issue, and in a real application this pattern typically leaks PII, tokens, or other sensitive object data belonging to arbitrary users.</p><p><strong>Remediation</strong></p><p>● Derive the resource owner from the authenticated session/token, never from a client-supplied parameter.</p><p>● On every object-level read/write, verify that the authenticated user is the owner of (or is authorized for) that specific object (note ID, username, etc.).</p><p>● Use indirect, non-guessable object references (e.g. UUIDs) in addition to server-side ownership checks.</p><p><strong><em>DVAPI-02: Broken Authentication via weak JWT signing secret allows full account takeover (admin impersonation)</em></strong></p><p><strong>Bug Type: </strong>Broken Authentication — OWASP API2:2023</p><p><strong>Severity: Critical</strong></p><p><strong>CVSS Score: </strong>9.8 (CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)</p><p><strong>Affected Endpoint: </strong>POST /api/login, GET/POST /api/profile (JWT-protected)</p><p><strong>Summary</strong></p><p>DVAPI issues JWTs signed with HS256 using a weak, dictionary-crackable secret. An attacker can capture their own valid JWT, brute-force the HMAC secret offline using a wordlist (e.g. rockyou.txt), and then forge a brand-new, validly-signed token with arbitrary claims (username=admin, isAdmin=true). The server accepts this forged token because it trusts the claims inside it.</p><p><strong>Steps to Reproduce</strong></p><p>1. Register/log in as a normal user and capture the issued JWT.</p><p>2. Extract the token and run an offline cracking tool against the token using a common wordlist such as rockyou.txt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6H7KVfVKX9T1MBTOyfMZrQ.png" /></figure><p>3. Recover the signing secret (observed: a weak dictionary word).</p><p>4. On jwt.io (or a script), craft a new JWT payload with “username”: “admin” and “isAdmin”: true, and sign it with the cracked secret using HS256.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rr4ke9jVAuEREB79uyRC1w.png" /></figure><p>5. Send the forged token to an authenticated endpoint such as /api/profile and observe the server treats the requester as admin.</p><p><strong>Impact</strong></p><p>Complete authentication bypass and full account takeover, including impersonation of the admin account. Because the application trusts isAdmin/username claims straight out of the token, an attacker with a cracked secret gains unrestricted administrative access to every protected function in the API — the highest-impact finding in this assessment.</p><p><strong>Remediation</strong></p><p>● Generate the JWT signing secret from a cryptographically secure random source with high entropy (32+ bytes); never use a dictionary word or short string.</p><p>● Prefer asymmetric signing (RS256/ES256) so the verification key cannot be used to forge tokens.</p><p>● Never trust role/identity claims (isAdmin, username) from the token alone — re-validate the user’s role against the backend/database on every privileged request.</p><p>● Rotate the signing secret and invalidate existing sessions after a key-compromise event.</p><p><strong><em>DVAPI-03: Mass Assignment on /api/register allows client-controlled score field (Broken Object Property Level Authorization)</em></strong></p><p><strong>Bug Type: </strong>Broken Object Property Level Authorization / Mass Assignment — OWASP API3:2023</p><p><strong>Severity: High</strong></p><p><strong>CVSS Score: </strong>7.5 (CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N)</p><p><strong>Affected Endpoint: </strong>POST /api/register</p><p><strong>Summary</strong></p><p>The registration endpoint binds the entire incoming JSON body directly to the backend user model without a field whitelist. Sending an extra score property in the registration payload sets that user’s leaderboard score directly, bypassing all legitimate score-earning logic.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Send a normal registration request and confirm a new account is created with a default score (0).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6FVIMoLz8lgVoUBc5ffrOg.png" /></figure><p>2. Send a new registration request, adding an unexpected score field with a large value to the JSON body.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EyZ63Nbsj7QpxCkIaMFBVA.png" /></figure><p>3. Log in as the new account and query the scoreboard endpoint (/api/scores).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dQg05tKgn8XiU8dikvlOAA.png" /></figure><p>4. Observe the attacker-supplied score value (capped at the app’s internal maximum) is reflected on the public leaderboard.</p><p><strong>Impact</strong></p><p>Any unauthenticated user can manipulate privileged/internal object properties (here, leaderboard score) that should only ever be set by server-side business logic. In a production system this class of bug typically extends to fields like isAdmin, balance, role or discount, leading to privilege escalation or financial/business-logic fraud.</p><p><strong>Remediation</strong></p><p>● Never bind raw client JSON directly to the database/ORM model.</p><p>● Use an explicit allow-list (DTO) per endpoint that defines exactly which fields a client may set.</p><p>● Keep sensitive fields (score, isAdmin, balance, role) settable only by trusted server-side code paths, never from request bodies.</p><p><strong><em>DVAPI-04: Unrestricted Resource Consumption — no file size limit on profile picture upload</em></strong></p><p><strong>Bug Type: </strong>Unrestricted Resource Consumption — OWASP API4:2023</p><p><strong>Severity: Medium</strong></p><p><strong>CVSS Score: </strong>6.5 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)</p><p><strong>Affected Endpoint: </strong>POST /api/user/profile/picture (profile picture upload)</p><p><strong>Summary</strong></p><p>The profile picture upload function does not enforce any maximum file size or content-type validation. A user can upload an arbitrarily large file (tested at 100MB) and the server accepts and stores it without restriction, exposing the application to disk-exhaustion and denial-of-service risk.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Generate an oversized dummy file: dd if=/dev/zero of=largefile.jpg bs=1M count=0 seek=60</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*mrXS88feiSd4B-l1pCkMVQ.png" /></figure><p>2. Log in and navigate to the profile picture upload feature.</p><p>3. Upload the 60MB file as the profile picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EPrbcEW-twDAX0zMs7cUlg.png" /></figure><p>4. Observe the server accepts the upload with no size/type rejection</p><p><strong>Impact</strong></p><p>Repeated large uploads from one or many accounts can exhaust server disk space, storage quotas, or bandwidth, resulting in denial of service for legitimate users. This is a classic resource-exhaustion vector with no authentication barrier beyond having any valid account.</p><p><strong>Remediation</strong></p><p>● Enforce a strict maximum upload size at both the web-server/proxy layer and the application layer.</p><p>● Validate MIME type and actual file content (magic bytes), not just the file extension.</p><p>● Apply per-user storage quotas and monitor for abnormal upload volume.</p><p><strong><em>DVAPI-05: Broken Function Level Authorization — regular users can DELETE other users’ accounts</em></strong></p><p><strong>Bug Type: </strong>Broken Function Level Authorization (BFLA) — OWASP API5:2023</p><p><strong>Severity: Critical</strong></p><p><strong>CVSS Score: </strong>9.1 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H)</p><p><strong>Affected Endpoint: </strong>DELETE /api/user/{username}</p><p><strong>Summary</strong></p><p>The /api/user/{username} resource allows the DELETE method for any authenticated user, not just admins or the resource owner. An OPTIONS probe reveals GET, HEAD and DELETE are all permitted, and a low-privilege token is sufficient to delete an arbitrary account.</p><p><strong>Steps to Reproduce</strong></p><p>1. Authenticate as a normal, non-admin user and obtain a valid token.</p><p>2. Send an OPTIONS request to /api/user/{anyUsername} and note that DELETE is listed as an allowed method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tSZE6O9Bu9lqn6hT07E7yg.png" /></figure><p>3. Send DELETE /api/user/{victimUsername} using the normal user’s token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DETbq-AGiioxczND9uQxkQ.png" /></figure><p>4. Confirm the victim account is deleted and the response/flag is returned.</p><p><strong>Impact</strong></p><p>Any authenticated user, regardless of privilege level, can delete any other account in the system, including administrator accounts. This is a critical destructive-action authorization failure that can be used for account takeover, sabotage, or mass account deletion (DoS against the whole user base).</p><p><strong>Remediation</strong></p><p>● Implement explicit role-based access control (RBAC) and enforce it server-side on every state-changing method (POST/PUT/PATCH/DELETE).</p><p>● Restrict destructive admin-only operations to verified admin roles, checked from the backend, not from client claims.</p><p>● Deny HTTP methods on a resource by default, and only allow exactly the methods each role requires (principle of least privilege).</p><p><strong><em>DVAPI-06: Unrestricted Access to Sensitive Business Flow — no rate limiting on support-ticket creation</em></strong></p><p><strong>Bug Type: </strong>Unrestricted Access to Sensitive Business Flows — OWASP API6:2023</p><p><strong>Severity: Medium</strong></p><p><strong>CVSS Score: </strong>5.3 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L)</p><p><strong>Affected Endpoint: </strong>POST /api/addTicket</p><p><strong>Summary</strong></p><p>The support-ticket submission flow has no rate limiting, throttling, or abuse detection. An authenticated user can script repeated submissions to the endpoint with no cooldown, flooding the support/ticket system.</p><p><strong>Steps to Reproduce</strong></p><p>1. Authenticate and send a normal POST to /api/addTicket with a sample message.</p><p>2. Re-send the same request in a tight loop (scripted, e.g. 50–100+ requests back to back).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-RP_3Kgd4s2RsY9Tcn5-BQ.png" /></figure><p>3. Observe that every request succeeds and creates a new ticket with no throttling, CAPTCHA, or per-user limit.</p><p><strong>Impact</strong></p><p>This business flow can be abused to flood the support queue, waste backend/storage resources, and bury genuine support requests under spam — a business-logic denial-of-service that doesn’t require any special privilege, just a valid account and a loop.</p><p><strong>Remediation</strong></p><p>● Apply rate limiting / throttling per user and per IP on sensitive business-flow endpoints.</p><p>● Add abuse-detection (e.g. CAPTCHA after N requests, exponential backoff) for ticket/message creation.</p><p>● Enforce sane business rules, e.g. a cooldown period between ticket submissions per user.</p><p><strong><em>DVAPI-07: Server-Side Request Forgery (SSRF) via user-controlled SecretNote URL fetch</em></strong></p><p><strong>Bug Type: </strong>Server-Side Request Forgery (SSRF) — OWASP API7:2023</p><p><strong>Severity: High</strong></p><p><strong>CVSS Score: </strong>8.6 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N)</p><p><strong>Affected Endpoint: </strong>POST /api/setSecretNote (or equivalent “set note via URL” function)</p><p><strong>Summary</strong></p><p>The “SecretNote via URL” feature fetches a user-supplied URL server-side with no validation or allow-listing. The server will connect to arbitrary external AND internal addresses (confirmed by fetching <a href="http://localhost:3000/">http://localhost:3000</a> successfully, and a closed internal port returning a distinct error), confirming the backend can be used as a proxy to probe internal network services.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Submit a note URL pointing to an external, known-good site (e.g. <a href="http://google.com)/">http://google.com)</a> and confirm the server fetches and stores the page content, proving the fetch is server-side.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8h3hAFriE08E4roOf-tZ4Q.png" /></figure><p>2. Submit a note URL pointing to the application’s own loopback address, e.g. <a href="http://localhost:3000,">http://localhost:3000,</a> and observe a 200 OK response, confirming internal connectivity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O0jAHXkyUf9HzIVwcTxKZA.png" /></figure><p>3. Submit a note URL to a closed internal port, e.g. <a href="http://localhost:525,">http://localhost:525,</a> and observe a distinct 500/connection-refused style response, which can be used to fingerprint open vs closed ports internally (port scanning via SSRF).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6YHARoBLHqDqS0pOZsXYCA.png" /></figure><p><strong>Impact</strong></p><p>SSRF allows an attacker to use the server as a proxy to reach internal-only services (databases, admin panels, cloud metadata endpoints) that are not directly reachable from the internet. Depending on what is reachable internally, this can escalate to internal port scanning, credential theft from cloud metadata services, or pivoting deeper into the internal network.</p><p><strong>Remediation</strong></p><p>● Maintain a strict allow-list of destinations the server is permitted to fetch (protocol + host).</p><p>● Block outbound requests to private/internal IP ranges (RFC1918), loopback addresses, and cloud metadata IPs (e.g. 169.254.169.254) at the application and network layer.</p><p>● Disable HTTP redirects during server-side fetches, or re-validate the destination after each redirect.</p><p>● Where possible, fetch through an isolated proxy/service with no access to internal network segments.</p><p><strong><em>DVAPI-08: Security Misconfiguration — verbose stack trace disclosure on malformed JWT</em></strong></p><p><strong>Bug Type: </strong>Security Misconfiguration — OWASP API8:2023</p><p><strong>Severity: Medium</strong></p><p><strong>CVSS Score: </strong>5.3 (CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N)</p><p><strong>Affected Endpoint: </strong>Any JWT-protected endpoint (e.g. GET /api/profile) with a malformed Authorization header</p><p><strong>Summary</strong></p><p>Sending a deliberately malformed/corrupted JWT causes the server to fail JWT parsing in an unhandled way, returning a full technical stack trace (including internal file paths and library details) directly in the HTTP response, instead of a generic error.</p><p><strong>Steps to Reproduce</strong></p><p>1. Capture a valid JWT, then corrupt a few characters in the token body or signature.</p><p>2. Send a request to an authenticated endpoint using the malformed token in the Authorization header.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YvIvnHDjJ_5-SRAgQv-3pA.png" /></figure><p>3. Observe the server returns an unhandled exception / stack trace in the response body rather than a clean 401.</p><p><strong>Impact</strong></p><p>Verbose error output leaks internal implementation details — file paths, library/framework versions, and code structure — that help an attacker fingerprint the stack and plan further, more targeted attacks. It is also a strong signal of generally weak error-handling hygiene across the application.</p><p><strong>Remediation</strong></p><p>● Centralize error handling and always return a generic, non-technical error message to the client (e.g. 401 Unauthorized) on JWT validation failure.</p><p>● Disable framework debug/verbose error pages in production.</p><p>● Log full technical detail server-side only (to an internal logging system), never to the HTTP response.</p><p><strong><em>DVAPI-09: Improper Inventory Management — hidden/unreleased challenges exposed via released parameter tampering</em></strong></p><p><strong>Bug Type: </strong>Improper Inventory Management — OWASP API9:2023</p><p><strong>Severity: Medium</strong></p><p><strong>CVSS Score: </strong>5.3 (CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N)</p><p><strong>Affected Endpoint: </strong>GET /api/allChallenges?released={value}</p><p><strong>Summary</strong></p><p>The public challenges-listing endpoint accepts a released query parameter that was intended only for internal use (e.g. released=1 for the live, documented set). Supplying an undocumented value such as released=unreleased causes the server to return a set of hidden/undocumented challenges that are not exposed anywhere in the official UI, confirming the existence of unmanaged, non-production-ready endpoints/content still reachable in the live environment.</p><p><strong>Steps to Reproduce</strong></p><ol><li>Call the documented endpoint: GET /api/allChallenges and note the official, published challenge list.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MFchKj_SXzkXqtDWFWJLoQ.png" /></figure><p>2. Tamper with the released parameter, trying alternate/undocumented values.</p><p>3. Try released=unreleased and observe the server returns an additional, previously hidden set of challenges not shown anywhere in the app’s own UI/documentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PCGlerAsJxjWkU4_6nIWGw.png" /></figure><p><strong>Impact</strong></p><p>Undocumented and unmanaged API behavior/content is reachable in the live environment simply by guessing parameter values. In a real deployment this pattern commonly exposes test/staging features, beta functionality, or internal tooling that was never meant to ship to production, widening the effective attack surface beyond what is documented or monitored.</p><p><strong>Remediation</strong></p><p>● Maintain a complete, up-to-date inventory of all API endpoints and parameters, including internal/test-only variants.</p><p>● Remove or properly gate unreleased/test functionality behind environment checks — never ship it reachable in production purely via an undocumented parameter value.</p><p>● Use API gateways / versioning to control exactly what is exposed per environment, and validate parameter values against a strict allow-list rather than trusting arbitrary client input.</p><p><strong><em>DVAPI-10: NoSQL Injection in login flow leads to authentication bypass (Unsafe Consumption of APIs)</em></strong></p><p><strong>Bug Type: </strong>Unsafe Consumption of APIs / NoSQL Injection — OWASP API10:2023</p><p><strong>Severity: Critical</strong></p><p><strong>CVSS Score: </strong>9.8 (CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)</p><p><strong>Affected Endpoint: </strong>POST /api/login</p><p><strong>Summary</strong></p><p>The login endpoint passes the username and password fields directly into a MongoDB query without sanitization or schema validation. Submitting a MongoDB query operator (e.g. { “$ne”: 1 }) as the password value causes the database to evaluate “password is not equal to 1”, which is always true, bypassing the password check entirely and authenticating as the targeted user (e.g. admin) with no valid credentials.</p><p><strong>Steps to Reproduce</strong></p><p>1. Identify the login endpoint and confirm it accepts a JSON body with username and password fields.</p><p>2. Instead of a normal string password, submit a MongoDB operator object as the password value, targeting a known/guessed username such as admin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KLPlB-OzusBsA7NnYolH5Q.png" /></figure><p>3. try nosql injection in passwd field Send the crafted request to /api/login.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dQF3nIU8bhOa--CiAsKPOg.png" /></figure><p>4. Observe that the server authenticates the request as the targeted user without a valid password, returning a valid session/token and the flag.</p><p><strong>Impact</strong></p><p>Complete authentication bypass against any target account, including admin, without knowing any valid credentials. Combined with the broken-authentication finding (DVAPI-02), this gives an attacker multiple independent paths to full administrative compromise of the application. This is a critical, trivially automatable vulnerability.</p><p><strong>Remediation</strong></p><p>● Never pass raw, untyped client JSON directly into a NoSQL query — explicitly cast/validate the expected type (string) of each field before querying.</p><p>● Enforce strict schema validation on all request bodies (e.g. with a JSON schema / validation library) and reject any field that is not a plain expected primitive type.</p><p>● Use parameterized queries or a vetted ORM/ODM layer that does not allow operator injection, and apply the principle of input allow-listing everywhere user input reaches the database layer.</p><h4><strong><em>Successfully Solve DVAPI lab!!!</em></strong></h4><p>Thanks to <a href="https://mahfujwhh.medium.com/">md mahfujwhh</a> for this wonderful lab to understand the API exploits.</p><p>Happy Hacking!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecaa97911819" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>