Why Third-Party Lookup Access Is an Enumeration Oracle Waiting to Be Abused
Security Intermediate 6 min read

Why Third-Party Lookup Access Is an Enumeration Oracle Waiting to Be Abused

A partner that can ask your identity dataset any question becomes an oracle. How structured identifiers, confirmed existence and unbounded volume turn lawful lookup access into bulk extraction.

Published: October 5, 2026 • Updated: October 5, 2026
enumerationapi securitythird-party riskidentity data

Denmark's Central Person Register lost the names, addresses and CPR numbers of about 8.8 million people in September 2026, and the government's own account says nobody exploited a vulnerability. The attackers misused a private company's lawful access to search the register. Reports describe a very large number of automated searches used to identify valid CPR numbers. That is the textbook shape of an enumeration attack against a lookup service, and the same shape appears in every organisation that lets partners query an identity dataset by identifier.

What a lookup service actually promises

A lookup service answers a narrow question for an authorised caller: given this identifier, return the matching record or say there is none. Registries, customer masters, KYC providers, insurance eligibility feeds, credit bureaus and HR directories all expose some version of it. The access is granted to a legal entity, scoped to a purpose, and usually governed by a contract that says the caller will only query identifiers it has a legitimate reason to check.

The security model rests on an assumption that is rarely written down: the caller already knows which identifiers it needs. A payroll provider knows its employees. A debt collector knows its debtors. Nobody is supposed to be asking about people they have no relationship with, so the service does not have to be designed to refuse that.

An enumeration attack breaks exactly that assumption. Instead of querying identifiers it knows, the caller generates identifiers it does not know and lets the service tell it which ones are real. Every positive response is a disclosure. The service has become an oracle: a component that will truthfully answer any well-formed question, as many times as it is asked.

Why structured identifiers make it worse

Enumeration is only practical if the identifier space can be walked in reasonable time. Random 128-bit tokens cannot be. National identity numbers almost always can.

A Danish CPR number is ten digits and begins with the holder's date of birth. That means the first six digits are not secret at all; they are one of roughly 36,500 valid dates for anyone alive in the last century. Only four digits remain to distinguish everyone born on the same day, so for any given birth date there are at most ten thousand candidates and typically only a handful of real people. A script that asks the lookup service about every candidate for one date will find all of them in a few thousand requests. Repeat for every date and you have the register.

The same arithmetic applies to US Social Security numbers, to many European tax and health identifiers, and to customer numbers that increment sequentially. Any identifier with low entropy relative to the number of valid entries is an enumeration target. The question is how many requests it takes and whether anything is counting them.

The three properties that turn access into an oracle

Not every lookup integration is equally dangerous. Three properties combine to make one exploitable at scale.

Existence is confirmed. If the service returns a different response for a valid identifier than for an invalid one, even just a different HTTP status or a measurably different latency, the caller can distinguish hits from misses. Most services do this deliberately because their legitimate users need the distinction.

Hits return more than a verdict. A pure verification endpoint answers yes or no. A lookup endpoint answers with a record. The CPR extraction yielded names and addresses alongside the numbers because the authorised search functions returned them. If the company's business purpose only ever needed confirmation that a number existed, every field beyond that was unnecessary exposure that the attackers inherited for free.

Volume is not bounded by purpose. A smaller Danish company, per TV 2's description, held access that could sustain ten days of automated querying across most of an 11-million-record register. Whatever ceiling existed on its requests, it was not derived from how many lookups that company's business could plausibly need. That gap between permitted volume and plausible volume is the budget an enumeration attacker spends.

Remove any one of the three and the attack degrades. Indistinguishable responses defeat enumeration outright. Verdict-only responses turn a data breach into a list of valid numbers with no names attached. Purpose-derived rate limits turn a ten-day extraction into a multi-year one that gets noticed.

Why the trust boundary is in the wrong place

The uncomfortable lesson of the CPR incident is that the registry's perimeter held. Every request came from a known, contracted, authenticated client. Nothing was bypassed. The defence that failed was the assumption that authorising a legal entity is the same as authorising each query that entity's credentials will ever make.

That assumption fails in three common ways. The partner's credentials are stolen, and the attacker inherits the partner's entitlements. The partner's own systems are compromised, and the attacker drives the integration from inside. Or someone at the partner decides to monetise the access. The registry cannot tell these apart from legitimate use by looking at any single request, which is why the professor who spoke to DR after the breach called for alarms on unusual lookup patterns rather than more authentication. The signal is in the aggregate, and How to Detect Bulk Enumeration Through a Partner's API Credentials Before It Finishes covers how to extract it.

This is the same category of failure as the Brevo incident earlier this year, in which a long-lived vendor API key with broad permissions was turned against a hundred thousand websites. Why a Long-Lived CDN API Key Is the Most Dangerous Secret in Your Codebase makes the point for infrastructure credentials. The CPR case makes it for data access: a credential that can ask about anyone is only as safe as the weakest organisation that holds it.

Designing a lookup service that is not an oracle

If you operate an identity lookup for third parties, four design changes address the problem at the root rather than at the alarm.

Offer verification before lookup. Most partner use cases are "confirm this person is who they claim" rather than "tell me who this is". A verification endpoint takes the identifier plus a claimed attribute and returns a match or mismatch, which makes bulk extraction pointless.

Make non-existence uninteresting. Where a lookup endpoint is genuinely required, return the same shape, status and timing for unknown identifiers as for protected ones. The CPR register already withheld data for people with name and address protection; extend that so an invalid number and a protected record look identical to the caller.

Derive quotas from purpose. A partner onboarded to verify two hundred new customers a month should have a ceiling in the low thousands per month, not whatever the API gateway defaults to.

Return the minimum. A hit should disclose only the fields the partner's stated purpose requires.

None of this requires novel technology. It requires treating a partner's lookup access as a standing capability to ask your most sensitive dataset any question, whose only real limits are the ones you choose to enforce. Why a National ID Number Can Never Be a Secret, and What to Authenticate With Instead covers the other half of the problem, which is what to do once the identifiers are already out.