Skip to main content
LowHost validationOWASP A01:2021CWE-639

How to fix: Sequential Numeric ID in URL (IDOR Risk)

The scanned URL contains a sequential numeric identifier in a path segment that suggests a resource ID. This is a passive URL-shape hint, not a confirmed access-control bug: the check only looks at the URL and has no way to tell whether the server actually returned another user's data (200 OK) or correctly rejected the request (401/403). Sequential IDs make Insecure Direct Object Reference (IDOR) attacks easier to enumerate once an access-control bug exists.

Why it matters

IDOR vulnerabilities are the most common access control bug in APIs. An attacker who finds /api/invoices/1042 can try /api/invoices/1043 to access another user's invoice. If the server doesn't verify ownership, the attack succeeds. A URL matching this pattern alone does not confirm that; it only flags a shape worth checking manually.

Sequential integer IDs (1, 2, 3...) are predictable and enumerable. The fix is not to hide IDs from attackers: it's to verify ownership server-side on every request. UUIDs make enumeration impractical but authorization checks are still required.

How to fix it

  1. 1Verify resource ownership on every API endpoint: confirm the requesting user owns the resource.
  2. 2Switch from sequential integers to UUID primary keys for user-facing resource IDs.
  3. 3Use the 'check before you leak' pattern: fetch, verify ownership, then return data.
  4. 4Implement automated IDOR testing in your security test suite.

Code examples

Ownership check on resource endpoint

TypeScript
export async function GET(req: Request, { params }: { params: { id: string } }) {
  const session = await requireAuth(req);
  const invoice = await db.invoice.findUnique({ where: { id: params.id } });
  if (!invoice) return new Response('Not Found', { status: 404 });
  // Critical: verify the requester owns this resource
  if (invoice.userId !== session.userId && session.role !== 'admin') {
    return new Response('Forbidden', { status: 403 });
  }
  return Response.json(invoice);
}

References

Detected automatically by VulnRadar. The check id is idor-sequential-id-in-url, stable across every scan so you can filter or diff on it.

See every host validation check

Questions

How severe is Sequential Numeric ID in URL (IDOR Risk)?
VulnRadar rates this low severity in the host validation category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id idor-sequential-id-in-url, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Sequential Numeric ID in URL (IDOR Risk) map to?
It maps to CWE-639. In the OWASP Top 10 it falls under A01:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for sequential numeric id in url (idor risk)

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

Sequential Numeric ID in URL (IDOR Risk) fix | VulnRadar