APIs are the attack surface nobody patrols
Every modern service (mobile apps, partner integrations, single-page applications) is a thin interface over an API. The security problem is structural: browsers are patrolled by WAFs and DLP, but APIs are called directly, at machine speed, often with no human ever looking at the request. The attacker does not need your password or your perimeter; it needs one endpoint that trusts an ID it should have checked.
The incidents below share one mechanic: an endpoint that returned someone else’s data. Whether the root cause was missing authentication, a broken ownership check, or an SSRF path to cloud metadata, the result is the same class of exposure that UU PDP Articles 35, 39 and 46 were written to prevent.
T-Mobile (2023)
An attacker abused a public-facing API to pull account data for roughly 37 million postpaid customers. No malware, no insider, no phishing. The disclosure forced a regulatory filing and a dedicated customer-support line for the breach.
Optus (2022)
Australia’s second-largest telco exposed about 10 million customer records through an API that did not require authentication, chained with a remote-code-execution flaw. The incident reset the national breach-notification debate and triggered multiple regulatory investigations.
USPS (2018)
A USPS API endpoint looked up account data for logged-in users but never enforced authentication itself. Researchers scripted the endpoint and retrieved details for an estimated 60 million users; KrebsOnSecurity documented the disclosure timeline.
Facebook (2018)
The “View As” feature generated access tokens without properly checking the token owner, letting attackers harvest tokens for roughly 50 million accounts. An API-level authorization failure with platform-wide impact.
PayPal (2022)
Credential stuffing against PayPal’s API authenticated about 35,000 accounts. The disclosure is a reminder that API login endpoints carry the same risk as web login pages, with higher request volume and fewer compensating controls.
Capital One (2019)
A Server-Side Request Forgery flaw in a misconfigured component let an attacker reach the cloud metadata service and exfiltrate personal information on more than 100 million applicants, API7:2023 SSRF in production.
The OWASP API security top 10 (2023), applied
OWASP publishes a dedicated top 10 for APIs because web-application testing alone misses the most damaging API flaws. For Indonesian organisations, the list doubles as a test specification: each category maps to a concrete control and to the UU PDP article it protects.
Broken object level authorization (BOLA)
Endpoints that accept an object ID and return data without verifying the caller owns it. The single most common API flaw — and the same IDOR/BOLA pattern that data-protection assessments in Indonesia find in banking and fintech integrations.
Broken Authentication
Weak token handling, missing rate limiting on login, and session flaws that let attackers assume other identities.
Broken object property level authorization (BOPLA)
Returning or accepting more properties than the caller should see or modify. Excessive data exposure and mass assignment under one root cause.
Unrestricted resource consumption
No quotas or throttling: one endpoint can exhaust compute, bandwidth, or paid third-party calls.
Broken function level authorization
Admin functions callable by regular users because role checks live only in the UI, not the API.
Unrestricted access to sensitive business flows
Automation abuse of business processes (mass lookups, scalping, fake accounts) because the flow has no abuse controls.
Server-Side request forgery (SSRF)
The API fetches a user-supplied URL without validation, letting attackers reach internal networks and cloud metadata services.
Security Misconfiguration
Debug endpoints, default credentials, verbose errors, and missing security headers across the API estate.
Improper inventory management
Shadow, deprecated, and undocumented API versions remain online and unprotected. A favourite finding in Indonesian enterprise estates.
Unsafe consumption of apis
Trusting third-party API responses without validation, or signing their data blindly into your own flows.
What UU PDP no. 27/2022 requires of your apis
The controller must implement operational technical measures to protect personal data and determine the security level based on the nature and risk of the data. API authorization flaws are, in regulatory terms, a failure of these technical measures.
The controller must prevent personal data from being accessed unlawfully, using security systems over the processed data and the systems that hold it. An unauthenticated API endpoint is the most literal violation of this article.
On a protection failure, the controller must notify affected data subjects and the supervisory institution within 3×24 hours of becoming aware. For API incidents, awareness usually starts with your own monitoring or a researcher’s disclosure. Before a vendor tells you anything.
Sanctions include written warnings, temporary suspension of processing, data deletion, and fines up to 2% of annual revenue. Assessed against the controller, not the development team that shipped the endpoint.
Unlawful access, disclosure, or use of personal data carries imprisonment and fines in the billions of rupiah, with multiplied corporate penalties. A BOLA bug that leaks customer data is not just a pentest finding. It is a legal exposure.
Eight controls that close the backdoor
Enforce object-level authorization on every endpoint
For every request that carries an object ID, verify ownership server-side, not in the UI. This is the direct defence against API1:2023 BOLA and the pattern regulators associate with unauthorised access under Article 39.
Rate limit, quota, and throttle at the API layer
Per-key quotas, sliding-window throttling, and abuse detection for sensitive flows. API4:2023 and API6:2023 are managed with numbers, not wishes.
Maintain a live API inventory
Document every host, version, and deprecated endpoint; kill shadow APIs before auditors find them. API9:2023 is the most embarrassing finding to defend in a data-protection audit.
Authenticate with short-lived tokens and MFA
OAuth 2.0/OIDC with short-lived access tokens, rotation, and MFA for privileged scopes. API2:2023 survives on long-lived tokens nobody rotates.
Validate input and allowlist destinations
Reject free-form URLs in fetch-like endpoints; allowlist internal destinations to break SSRF (API7:2023) chains toward metadata services.
Log, monitor, and alert on anomalies
Audit events for authorization failures, unusual object-ID sequences, and burst traffic. The telemetry that starts your Article 46 clock.
Contract API security into vendor agreements
Require vendors to meet these same controls, grant audit rights, and align breach notification inside your 3×24-hour window. Under UU PDP, the controller’s duty survives the contract. The contract is how you enforce it.
Test APIs the way attackers do
API-specific penetration testing aligned to OWASP API Security Top 10 and ASVS, plus threat modelling on every release that adds an endpoint.
A 90-day program, sequenced
- Inventory every API host, version, and endpoint; mark shadow and deprecated APIs for takedown
- Map object-level access paths: which endpoint returns which object to which role
- Run a first-pass BOLA/BOPLA review on the highest-value endpoints
- Implement server-side authorization checks and property filtering on critical endpoints
- Deploy rate limiting, quotas, and abuse detection on sensitive flows
- Stand up API logging with alerting on authorization failures
- Harden authentication: short-lived tokens, rotation, MFA on privileged scopes
- Pen-test the API estate against OWASP API Top 10 with ASVS-based evidence
- Tabletop an API breach including the Article 46 clock, and report to the board
Frequently asked questions
What is the difference between BOLA and BOPLA?
BOLA (API1:2023) means a caller can access an entire object (another user’s record) by changing an ID. BOPLA (API3:2023) means the API returns or accepts individual properties beyond the caller’s entitlement, such as leaking a field that should be filtered or accepting a role field that should be ignored.
Does UU PDP explicitly require API security testing?
The law does not name “API testing”, but Articles 35 and 39 oblige the controller to implement technical measures protecting personal data and to prevent unauthorised access. An API estate with broken authorization is, by definition, non-compliant with those articles regardless of terminology.
What are the maximum penalties for an API-related data breach?
Article 57 allows administrative fines up to 2% of annual revenue, alongside written warnings, suspension of processing, and data deletion. Criminal provisions in Articles 67–70 carry imprisonment and fines in the billions of rupiah, with multiplied corporate penalties under Article 70.
Which APIs should we prioritise. Public or internal?
Both, but internal APIs are the ones most often forgotten: they carry production data with weaker authN and no external scrutiny. Prioritise by data sensitivity and blast radius: an internal customer-data API outranks a public weather endpoint even though it has no public URL.
- UU no. 27 tahun 2022 tentang pelindungan data pribadi
- OWASP API security top 10 — 2023
- OWASP — API1:2023 broken object level authorization
- NIST SP 800-53 rev. 5, access control and audit families
- KrebsOnSecurity — USPS site exposed data on 60 million users
- PayPal newsroom — update on attack affecting paypal accounts
- Meta — security update (september 2018)
- T-Mobile — statement on the january 2023 API breach
- Optus — cyber incident media release (september 2022)
- U.s. SEC — capital one form 8-k (july 2019)
The uncomfortable truth about API security is that it is a test of discipline, not technology: authorization checks on every endpoint, quotas that are actually enforced, and an inventory that is actually current. Organisations that treat the API estate as a first-class security surface (tested, logged, and contracted) convert Article 35 and 39 obligations from paperwork into engineering reality.
