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
- 1Verify resource ownership on every API endpoint: confirm the requesting user owns the resource.
- 2Switch from sequential integers to UUID primary keys for user-facing resource IDs.
- 3Use the 'check before you leak' pattern: fetch, verify ownership, then return data.
- 4Implement automated IDOR testing in your security test suite.
Code examples
Ownership check on resource endpoint
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.
More host validation checks
- HighHost Header Injection Risk
- MediumSymfony Debug Token Header Exposed
- HighHTTP Request Smuggling Indicator
- HighHTTP Basic Authentication Over Non-HTTPS
- MediumASP.NET ViewState Without MAC Protection
- HighCache Poisoning via Unkeyed Headers
- HighConfirmed Open Redirect via Location Header
- HighConfirmed Open Redirect via Meta Refresh
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.