Excessive Data Exposure

An API returns more fields or records than the client needs, trusting the client to filter what’s shown. It is the read side of OWASP API3:2023 (BOPLA): object-level authorization passes, but no per-property check filters sensitive fields before serialization.

How it works

  • Frameworks serialize whole objects by default: render json: @user, res.json(user), FastAPI returning a model directly, Jackson/Marshmallow/JSON.stringify(). Every accessible column goes out unless a filter is configured.
  • The UI shows a username; the API response behind it also carries email, internal IDs, email_verification_token, password_reset_timestamp, is_admin, account_flags, or session tokens. The gap between what’s rendered and what’s returned is the bug.
  • GraphQL amplifies it: clients request fields explicitly, so any field defined in the schema is readable unless a resolver enforces field-level authz. See GraphQL Authorization Flaws.
  • It often chains: leaked internal IDs feed BOLA in APIs; leaked emails feed enumeration; leaked OTPs give Account Takeover.

Techniques / payloads

  • Inspect the raw response, not the UI. Proxy the app, send the loading request to Repeater, and read every field the JSON carries. The interesting data is what the frontend discards.
  • Reconstruct endpoints from clients. Decompile mobile apps to find undocumented endpoints and their full schema (vAPI api3: POST/GET /api3/comment returned a deviceid field, found only in the APK).
  • Diff across roles and records. A field present for every role, or data for users who never interacted with the feature, signals over-exposure.
  • Walk sequential IDs / unauthenticated access. If the record endpoint doesn’t enforce auth at the endpoint (only in the navigation flow), request it directly and increment the ID.
  • GraphQL: introspect the schema, then request sensitive fields (salary, creditScore, token) directly.

Notable cases

  • vAPI api2. GET /vapi/api2/user/details returned a JSON array of every user — id, email, address and each user’s own session token — regardless of which valid token was sent. Those tokens could be replayed for direct ATO.
  • Online training platform ($reward). POST /api/v1/discussions/loadStreams.do returned a usersInfo array with full emails and internal IDs for everyone enrolled in a course, not just discussion participants — learners, trainers and admins. A fresh unverified account enrolled in free courses harvested 14,000+ unique emails.
  • AI freelance marketplace. GET /api/developer/profile-details?id=22861&devId=20939 loaded with no auth when hit directly and used a sequential integer ID; the endpoint served ~19,990 user profiles’ PII. Auth was enforced at the navigation layer, not the endpoint.
  • Tata nexarc. The login API CheckForUsersRegisteredWithEmailOrMobileNoAndSendOTP.do returned an otpGeneratedForMobile field (AES-encrypted client-side, readable at a JS breakpoint). Copying the OTP from the response gave ATO, including an admin account on Tata Business Hub. Fixed by removing the field.
  • Twitter (2022, $5,040). A pre-auth login-flow step resolved an email/phone to a user ID without consulting the discoverability setting, mapping contacts to accounts at scale.
  • snowpick / ServiceNow. Public widgets and the Table REST API returned backend records (e.g. sys_user) to a public session where ACLs on one path were loose.
  • USPS Informed Visibility (~60M accounts). A search API honored wildcard terms; shared data points (one street address) surfaced every linked account in one query (USPS).
  • Bolt CMS (CVE-2026-77379, fixed 6.1.4). The public Relation API skipped the access-control filter the content endpoints apply, so unauthenticated callers enumerated metadata of unpublished, draft and viewless records over both REST and GraphQL. This is a reminder that relation, listing and lookup endpoints need the same publication-state filter as the primary read (GHSA-6358-jg5p-hmjj).

Defenses

  • Serialize explicitly. Build response DTOs field by field (UserPublicSchema) instead of returning ORM entities. Map internal objects to external contracts through transforms that evaluate the caller’s permissions per field.
  • Field-level authz. GraphQL resolvers check read access per field and return null/error otherwise. REST uses projection queries (name columns, never SELECT *).
  • Validate outbound payloads against a declared schema before sending, to catch drift.
  • Enforce auth at the endpoint, never only in the client flow. Classify property sensitivity (public/internal/confidential/restricted) and drive inclusion from the caller’s context.

See also: CORS Misconfiguration

Sources