Broken Access Control and Security Misconfiguration
Identify missing permission checks and insecure default settings, and decide how access control should be enforced on the server.
One digit away from someone else's prescription
Riya Menon, the intern, orders a cough syrup on the Tulsi Health app to see how the order screen works. The address at the top of the screen ends in /orders/58213. Out of curiosity she changes the last digit to 4 and presses Enter, and the screen now shows Mrs. Lata Gokhale's order: her name, her phone number, her Kothrud address and her blood pressure and diabetes prescriptions. Riya never broke a password or used any special tool. The app simply never asked whether order 58214 belonged to the person asking for it. This is broken access control, and for years it has been the most common serious weakness found in web applications.
Changing one number in the address showed another customer's health details. Nothing on screen looked like an attack.
Logged in is not the same as allowed
The address of a web page, also called its URL, is the text in the bar at the top of the browser, such as tulsihealth.in/orders/58213. Anyone can edit it, just as anyone can write any number on a library request slip. Each time the address changes, the browser sends a new request to the server, the Tulsi Health computer that stores the orders and decides what to send back. Whatever the server sends, the browser shows.
Two different questions have to be answered for every request. Authentication asks "who are you?", and the login with password and one-time code answers it. Authorisation asks "are you allowed to do this particular thing?", and it has to be answered again for every order, every file and every button. Access control is the set of rules and checks that answers the second question, and it is "broken" when a check is missing or wrong. Riya was genuinely logged in, so authentication worked; authorisation was never asked.
A hotel makes the difference easy to see. The front desk checks your ID once and gives you a key card, which is authentication. But the card opens only room 214, because the lock on every door checks the card again, which is authorisation. A hotel whose doors opened for any guest's card would have perfect check-in and no privacy at all. When the app showed order 58214 to Riya, it behaved like a door that opens for anyone holding any card.
The fix is one question asked on the server every time: does this record belong to the person asking? Replying 'not found' also avoids confirming that order 58214 exists.
Where permission checks go missing
Changing a number to reach someone else's record, as Riya did, is the classic case of unauthorised resource access. A resource is anything the app can show or change: an order, an invoice, a staff page, a setting. The weakness behind it is a missing permission check, a place where the server does what is asked without first confirming the person is allowed. It hides in a few familiar places, and in each one the developer believed something else was doing the checking.
In every case the server trusts something the person asking can change or simply type in.
The last two deserve a closer look. The app on a customer's phone runs on a device the customer controls, so anything it does can be skipped or imitated. A greyed-out "Edit price" button stops honest users, but a person who sends the request directly is never stopped if the server does not check. In the same way, if the phone says "this user is a pharmacist" and the server believes it, then anyone can become a pharmacist by changing that one word.
Enforcing access on the server, every time
Access control enforcement means the checks live on the server and run on every single request, not just at login and not just on the screens people normally use. A few habits make this work. Deny by default: if no rule says a person may do something, the answer is no. Check ownership: a customer's request for an order succeeds only if the order is theirs. Least privilege: each staff role gets only the access its job needs, so a delivery rider sees delivery addresses but not prescriptions. And failed attempts are logged, so that Neha Kulkarni, the IT and security lead, notices if one account is trying hundreds of order numbers.
Neha is setting up the staff roles for the new app dashboard. Every role currently has full Edit access to everything, which is quick to set up and dangerous. Reduce each role to what the job actually needs below, then check your choices.
Security misconfiguration: a lock still set to 0000
Many breaches need no flaw in the code at all, only a setting left the way it came from the factory. This is security misconfiguration: software that would be safe if set up carefully, but was installed with unsafe settings or never finished being set up. Picture a new combination padlock on the invoice cupboard, still on its factory code 0000. The lock is strong; the setting makes it useless.
A default password is a factory lock code: identical on every unit sold, and printed where anyone can read it.
The most common form is default credentials: the username and password a product ships with, such as admin and admin on a router or a demo account in billing software. They are the same on every unit and published in manuals, so attackers try them first. Other insecure settings are just as common. Detailed error pages show the inside of the app (file names, database details) to anyone who causes an error. Test pages and sample accounts are left online after launch. A cloud folder of invoices is shared with "anyone who has the link". Services nobody uses, such as an old remote-access tool, are left switched on, each one another door to guard.
The cure is a habit called hardening: before anything goes live, change every default password, switch off what is not used, make error messages short and plain for users, restrict admin pages to the office network, and turn on updates. Then check the settings again on a schedule, because settings drift as people make "temporary" changes.
Neha has walked through Tulsi Health's systems and written down what she found. Sort each finding into a risky setting that needs fixing, or a safe setting to keep.