Skip to content
Research

The Unread Authorization Header: How One Sequential Integer Exposed 70,000+ Customer KYC Files

During a 48-hour authorised black-box assessment for a regulated European operator, Breachger uncovered a shared API pattern where sending a sequential integer without credentials returned complete customer KYC dossiers – national ID numbers, government IDs, IBANs, and home addresses – across an entire database.

Anyone on the internet could read the complete KYC identity file of every customer on a regulated European platform by sending one unauthenticated POST request with a sequential integer.

During a 48-hour authorised black-box assessment, Breachger was brought in to answer a direct question: can an external party retrieve customer data without credentials? Within hours, we established full read access to more than 70,000 customer records across a cluster of sibling API endpoints – with no session cookie, no bearer token, and no rate limit. Client identity, jurisdiction, backend stack identifiers, and exact route paths have been anonymized throughout this write-up. What follows is how the vulnerability worked, why it repeated across the entire module, why its CVSS 7.5 base score hid an existential GDPR incident, and how to fix the class of bug without breaking production sign-up.

Summary

  • Root cause: A shared API convention resolved the target customer from a body-supplied accountId instead of the authenticated session.
  • Unread credentials: The Authorization header was not merely unenforced – it was unread. Identical requests with no header, an empty header, and Authorization: Bearer invalid all returned HTTP 200.
  • Blast radius: Roughly 60 endpoints were recovered directly from client-side JavaScript bundles. The same calling convention repeated across bank accounts, uploaded ID document metadata, external verification vendor IDs, and lifetime customer financial turnover.
  • Scoring trap: CVSS v3.1 caps read-only unauthenticated disclosure at 7.5 High because it does not price record volume or KYC completeness. Contextually, this was an unambiguous Critical exposure engaging GDPR Articles 32, 33, and 34.
  • Remediation trap: A blanket "require a bearer token everywhere" hotfix breaks legitimate pre-login onboarding. Fixing the class safely requires session binding, a scoped pre-auth registration token, a module-wide audit, and negative CI regression tests.

Assessment overview and findings

Testing was strictly read-only against real customer records; zero customer records were altered. The only write operations were isolated throw-away registrations created to exercise the onboarding wizard. All live findings were escalated immediately to the client for emergency remediation.

IDFindingContextual severityCVSS v3.1 base
F-01Unauthenticated customer KYC disclosure via body-supplied accountIdCritical7.5 High
F-02Identical defect repeated across sibling account, banking, document, and stats endpointsHigh7.5 High
F-03Registered account and e-mail enumeration via password-reset response discrepancyMedium5.3 Medium
F-04Four-digit registration SMS confirmation code (10,000-code space, opaque HTTP 500 errors)Low3.7 Low

Notice F-04 at the bottom of that table. We ran two independent 10,000-code sweeps against separate throw-away registrations and neither hit – indicating per-account lockout terminated attempts long before a single sweep could finish. The weak code space is real, and a multi-account sweep remains theoretically feasible with disposable numbers, so we documented the exact boundary and rated it Low rather than inflating an unconfirmed exploit. Separating proven impact from speculative risk is what lets an engineering team fix the real fire first.

From client bundle to full KYC disclosure

Conventional scanners probe common paths and guess parameter names. On modern single-page applications, the client itself ships the map.

  1. API surface recovery. Instead of guessing routes, we retrieved the application's minified JavaScript bundles and extracted roughly 60 live API routes directly from client service definitions.
  2. Three-way authentication check. On the customer registration lookup endpoint, we sent the same JSON body ({"accountId": 100042}) three ways: with no Authorization header, with an empty Authorization: header, and with a deliberately malformed Authorization: Bearer invalid. All three returned the identical HTTP/2 200 payload (~33 KB of JSON). The bearer token sent by the browser on other calls was never inspected.
  3. Parameter tampering and bisection. Changing accountId switched the returned customer immediately. Although the internal integer never appeared in the customer-facing UI, the API returned it verbatim inside every response. Because identifiers were small, contiguous sequential integers, binary search quickly bounded the live range to more than 70,000 active accounts.
  4. Cache exclusion. To rule out CDN or reverse-proxy caching artifacts, we queried cold identifiers never previously requested during the engagement. Every request returned a distinct, live customer record directly from the application layer – with zero rate limiting, throttling, or bot challenge.

A single unauthenticated request was enough to pull a complete ~33 KB profile (host, route, parameter name, and response values anonymized):

curl -s -X POST \
  -H 'Content-Type: application/json' \
  -d '{"accountId": 100042}' \
  https://api.target.example/v1/account/registration/get

The server answered immediately with HTTP/2 200 and the full structured profile:

{
  "status": "OK",
  "accountFields": {
    "login": "[REDACTED]",
    "email": "[REDACTED]",
    "emailVerified": true,
    "phoneVerified": true,
    "documentVerified": true,
    "personalInfo": {
      "firstName": "[REDACTED]",
      "lastName": "[REDACTED]",
      "birthdate": "[REDACTED]",
      "nationalIdNumber": "[REDACTED]",
      "birthPlace": "[REDACTED]",
      "nationality": "[REDACTED]"
    },
    "governmentId": {
      "number": "[REDACTED]",
      "type": "ID",
      "placeOfIssue": "[REDACTED]",
      "validUntil": "[REDACTED]",
      "status": "CONFIRMED",
      "source": "ONLINE"
    },
    "phone": { "msisdn": "[REDACTED]", "verified": true },
    "bankAccount": { "number": "[REDACTED]", "iban": "[REDACTED]", "verified": true },
    "addresses": [{ "street": "[REDACTED]", "city": "[REDACTED]", "zip": "[REDACTED]" }],
    "accountStatus": "ACTIVE",
    "aml": { "flags": "[REDACTED]" },
    "consents": "[REDACTED]"
  }
}

The handler's authorization logic effectively asked "does this integer exist?" instead of "is the caller entitled to this record?".

What a single response returned

The response was not a slim UI summary. It was the full compliance dossier required to onboard and verify a regulated customer.

Field groupDisclosed attributesRisk enabled
Account identifiersLogin handle, e-mail address, verification flagsCredential stuffing, targeted phishing
Legal identityFull legal name, date of birth, place of birth, nationalitySynthetic identity and impersonation
Government IDsNational identity number, government ID card number, issuing office, expiry date, verification statusRemote identity proofing at lenders, banks, and telecoms
Contact and postalVerified mobile number (MSISDN), permanent and secondary street addressesSIM-swap pretexting, physical mail interception
BankingDomestic account number, IBAN, verification statusPayment redirection, fraud pretexting
Compliance stateAccount state, AML flags, timestamped consent historyRegulatory sensitivity and customer profiling

Full name, national ID number, government ID card number (including issuing office and validity date), permanent address, verified phone number, and IBAN are not merely "personal data." Together, they are the exact remote identity-proofing kit used across European financial institutions and mobile carriers. Even a careful verification clerk has little left to challenge when an attacker holds every field on that list.

The real problem was not one endpoint – it was a base handler

A single unprotected route is an oversight. The same POST + {"accountId": N} convention repeating across an entire API module is an architectural defect – almost always tracing back to a shared base controller or client wrapper.

Once F-01 was confirmed, we applied the same unauthenticated test across sibling routes recovered from the client bundle (F-02):

Anonymized routeAdditional data returned unauthenticated
POST /v1/account/bank-accounts/getFull bank account numbers, bank codes, IBANs, internal banking IDs, verification state
POST /v1/account/documents/getFile IDs, document types, verification states, external KYC vendor names, and original device filenames (including mobile banking screenshots)
POST /v1/account/identity-docs/getFront and back ID-card file IDs and filenames, plus passport and driving-licence slots with per-document status
POST /v1/account/identity-verification/getVerification status per third-party KYC vendor, including remote wallet and provider-issued account identifiers
POST /v1/account/activity-stats/getMonthly and lifetime customer financial turnover and net performance – commercially sensitive competitive data independent of PII
POST /v1/account/bonuses/getActive promotional state, vouchers, and first-account eligibility indicators
POST /v1/account/payout-cards/getStored payout card metadata, where present

Two secondary details multiplied the blast radius:

  • Chained account takeover (F-03). The password-reset endpoint returned {"status": "OK"} for registered addresses and {"status": "FAIL", "fault": {"error": "ERR_EMAIL_NOT_FOUND"}} for unknown ones. Standalone, response discrepancy is a routine Medium. Combined with F-01, it gives an attacker login, verified phone, and confirmed live e-mail addresses across the customer base before launching targeted takeover or phishing campaigns.
  • Document metadata as a stepping stone. While our black-box test did not locate the binary image-download route in the client bundle – and we reported that boundary transparently rather than assuming unverified image exfiltration – the leaked file identifiers and original device filenames are the exact prerequisite an attacker needs if the download route shares the same base handler.

Why CVSS 7.5 lies about business risk

Under CVSS v3.1, an unauthenticated, network-accessible, read-only confidentiality flaw with unchanged scope scores 7.5 High (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N). That is the arithmetic ceiling of the formula.

CVSS does not price volume, and it does not distinguish one non-sensitive user profile from 70,000+ complete government-verified KYC records. Treating this as a routine "High" backlog item because of a base score is how organizations sleepwalk into regulatory catastrophes.

Three operational facts drove the contextual Critical rating:

  1. Silent exfiltration. Read endpoints leave no visible artifact in a customer's account or UI. Without principal-level read auditing, once a breach occurs an operator cannot prove which subset of records was accessed and must treat the entire customer base as exposed.
  2. GDPR Articles 32, 33, and 34. Missing authorization on national IDs, government document numbers, and IBANs is a failure of basic technical security (Art. 32), triggering mandatory 72-hour supervisory authority notification from awareness (Art. 33) and high-risk direct notification to affected data subjects (Art. 34).
  3. Trivial demonstrability. A one-line curl command with an integer leaves zero room to characterize the issue as theoretical if discovered externally.

Fixing the class without breaking production sign-up

When a bug like this lands on an engineering team's desk, the natural reflex is to ship a five-line emergency middleware patch: require a valid Authorization: Bearer token on every route under /v1/account/*.

That obvious hotfix breaks production.

During onboarding, registration/get is legitimately called by unauthenticated clients before a user has completed login. A blanket token gate closes the leak and kills the sign-up funnel in the same deploy.

Closing the vulnerability class safely takes four coordinated steps:

  1. Bind every endpoint to the authenticated session. Resolve the acting user exclusively from the server-verified session or token. Never use a caller-supplied accountId as the authority for which record to load. If legacy clients still pass accountId in the JSON body, treat it strictly as an assertion and reject any mismatch with HTTP 403.
  2. Carve out an explicit pre-authentication registration token. For the narrow pre-login onboarding calls that genuinely run before session creation, issue a short-lived, cryptographically random registration token scoped exclusively to that single in-progress sign-up state – never a guessable sequential integer.
  3. Fix the shared base handler, then audit every route in the module. Patching the 7 confirmed endpoints while leaving ~50 sibling routes on the same base controller guarantees gaps. Switch the base handler to default-deny authentication and explicitly allowlist the tiny set of public routes.
  4. Prevent silent regression with CI checks and principal logging. Missing authorization checks silently reappear during refactors. Add automated integration tests for every route in the module, and record the requesting principal on every customer-record read so future anomalies are measurable in logs rather than estimated after the fact.

Before closing the finding, every item in the deterministic verification matrix should pass:

CheckRequest conditionExpected behavior after fix
1. Unauthenticated readPOST registration/get with {"accountId": 100042} and no auth headerRejected (401/403) or explicit typed error – never a full record
2. Invalid credentialSame call with Authorization: Bearer invalidRejected deterministically
3. Horizontal IDORValid session for User A requesting {"accountId": <User B>}Rejected (403) or strictly scoped to User A's own record
4. Module sweepRepeat checks 1–3 across all ~60 routes in the moduleUniform enforcement across every sibling handler
5. Business continuityExecute a fresh end-to-end customer registrationOnboarding completes cleanly with scoped pre-auth token
6. Enum & OTP hardeningPassword reset (known vs. unknown e-mail) and invalid SMS codeUniform reset response; 6-digit OTP bound to registration session with typed lockout error

Takeaways for engineering and security teams

  • Authorization is never "does this ID exist?" Every data loader must prove caller entitlement, not row existence.
  • UI obscurity is not access control. Hiding internal integers from the frontend buys zero protection when they live in API responses and JavaScript bundles.
  • Fix the base class, not the symptom. One IDOR in a module almost always means a shared router or base handler defect across dozens of sibling routes.
  • Never let a CVSS base score override business context. Unauthenticated bulk KYC exfiltration scores 7.5 on paper and behaves like a 10.0 with regulators.
  • Verify both the exploit and the funnel. Every authorization hotfix needs a deterministic exploit retest and an end-to-end check of legitimate pre-auth workflows.

Breachger built its offensive platform around this exact discipline: recovering real API surfaces from live client code, probing authentication boundaries and sibling handlers systematically, discarding unverified noise, and delivering reproducible proof plus retest verification. If you want to verify your own application and API boundaries before your next release, you can start with a Single-App Proven Audit – one app and its APIs tested in 24 hours, with 100% of the $2,500 fee credited toward Continuous Assault within 30 days.