Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6981755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:11:54+00:00 2026-05-27T18:11:54+00:00

Is it a security risk to expose the ID number of a SQL row?

  • 0

Is it a security risk to expose the ID number of a SQL row?

For example, there is an event with an ID of 12.

Is it a security concern if someone accesses it via http://example.com/events/12, or someone makes a POST to http://example.com/events/12 in order to update that record (assuming I allow this of course)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:11:55+00:00Added an answer on May 27, 2026 at 6:11 pm

    The problem of exposing ID’s to users is often referred to as “insecure direct object references” in a web security context.

    From OWASP:

    Preventing insecure direct object references requires selecting an approach for protecting each user accessible object (e.g., object number, filename):

    1. Use per user or session indirect object references. This prevents
      attackers from directly targeting unauthorized resources. For
      example, instead of using the resource’s database key, a drop down
      list of six resources authorized for the current user could use the
      numbers 1 to 6 to indicate which value the user selected. The
      application has to map the per-user indirect reference back to the
      actual database key on the server. OWASP’s ESAPI includes both
      sequential and random access reference maps that developers can use
      to eliminate direct object references.
    2. Check access. Each use of a direct object reference from an
      untrusted source must include an access control check to ensure the
      user is authorized for the requested object.

    A defense in depth approach would be to do both 1 & 2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example: http://stackoverflow.com/questions/396164/exposing-database-ids-security-risk and http://stackoverflow.com/questions/396164/blah-blah loads the same question. (I guess this is DB
With the URL Structure like http://www.site.com/user/1 , is it a security risk? For example
I've heard that exposing database IDs (in URLs, for example) is a security risk,
Is there a security risk if an application called page.ashx called internal only page.ashx,
Is there a security risk associated with using the option that copies All project
There are many discussions about security risk for saving hash password in cookies, as
I am wondering if there is any potential security risk from the following code.
this is a 3 part question Is there any performance or security risk in
Is there a security risk in exposing MySQL table fields name in form fields?
Is there any security risk in allowing a user to upload an HTML file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.