Securing Your Web Applications: Understanding and Preventing Broken Access Control

Scrubbed

Scrubbed

Securing Your Web Applications: Understanding and Preventing Broken Access Control

Introduction

Broken Access Control (BAC) might sound like a minor issue, something easily spotted, but it’s actually one of the most frequently overlooked security flaws. While many focus on threats like Remote Code Execution (RCE) or Cross-site Scripting (XSS), BAC silently allows unauthorized users to perform actions they shouldn’t, often without any complex attack. A simple forgotten backend check can lead to sensitive data exposure or elevated permissions, just by slightly modifying the target web address.


In this post, we’ll walk through how you can test for Broken Access Control using Open Worldwide Application Security Project (OWASP) Juice Shop—an intentionally vulnerable web application that makes it easy (and safe) to demonstrate these issues in practice.


Understanding Broken Access Control

Access control directs who can do what in a system. When it’s broken, users can act outside their intended permissions. Users might be able to read other users’ data, modify other roles, or access administrative functionality without authorization. OWASP defines this category broadly and it includes:

  • Vertical privilege escalation: Accessing higher privilege functions (e.g., a user accessing admin functions).
  • Horizontal privilege escalation: Accessing same role resources (e.g., viewing another user’s order).
  • IDOR (Insecure Direct Object Reference): Accessing data by manipulating object references like user IDs or filenames.
  • Forced browsing: Accessing hidden resources or unlinked pages directly.


While it might be hard to understand these concepts at first, Juice Shop does a great job showcasing these problems in a safe, intentionally vulnerable playground.


Testing for Broken Access Control

For this simulation, you will need to install Juice Shop in your local environment and use Burp Suite to capture traffic while interacting with it.

Owasp juice shop

Burp suite

Gaining Privileged Access

Juice Shop is a deliberately vulnerable web application that exhibits the classic Forced Browsing and Vertical Privilege Escalation vulnerability. Imagine if someone could access admin functions by just visiting a URL; that would be a security nightmare. Fortunately, we can demonstrate this in Juice Shop without the risk.


You can test this by attempting to access hidden resources or unlinked pages directly using keywords such as “admin,” “root,” or other common path names in the URL. In our case, the Administration page can be accessed by visiting the “/#/administration” path. This page was not linked anywhere in the standard UI, yet entering the URL directly allowed full access to the user listing and the ability to remove customer feedback.

Owasp juice shop 2

Note that this vulnerability is accessible if you are already logged in or tagged as an admin role user inside OWASP Juice Shop. However, given that this is hidden in the user interface even if you log in as an admin user, we can infer that it was not meant to be exposed to users (including admin users). In some real-world scenarios, some web applications allow access to the affected endpoint to all users as long as they enter the correct address.


But you’re probably curious how we can access this page using a regular, low-privileged accountFirst, inspect how the authentication works. Upon logging in, a token will be sent to your browser and subsequently attached to every HTTP request made to Juice Shop.

Burp suite 2

At this point, you will have to study JWT, but let’s assume that you already know it. What do you think would happen if we change the JWT role parameter or claim to something else, like “admin”?

Jwt decoder

You guessed it right. Modifying the JWT and changing it to “admin” allowed us to access the “/#/administration” page while logged in as a regular user. All you need to do is use Burp Suite’s JWT Editor extension, modify the role parameter or JWT claim to “admin,” go to your browser’s local storage, and replace the token key with the modified JWT, and Voila! You now have access to the Administration page even as a regular user.

Owasp juice shop 3

Viewing and Tampering Another User’s Basket

This is an example of Insecure Direct Object Reference (IDOR) and Horizontal Privilege Escalation. Imagine if you have an e-commerce site and anyone can add or delete items in another user’s shopping cart. That would leave your customers confused.


To test this vulnerability, log in as a regular user and inspect HTTP requests and responses related to user basket actions. In Burp Suite, notice that visiting your own basket generates a “GET /rest/basket/6” request to Juice Shop. Immediately, you can see from that request that our basket has an ID of “6.” Out of curiosity, if we change the basket ID to another number, will we be able to access other users’ baskets? It turns out we can.


There are a couple of ways to test this, but by going to the browser’s Developer Tools > Storage > Session Storage, we can see a “bid” parameter. Modifying it to another number, in our case “3,” and refreshing the page would let us access basket #3—with no ownership check, just the data. This is an example of a horizontal IDOR vulnerability, where users at the same privilege level can access each other’s data by simply modifying object references.

Owasp juice shop 4

Alternatively, the details for basket #3 can also be accessed by repeating the original HTTP request in Burp Suite and modifying the ID to “3”.

Burp suite 3

We were able to see the details of the other user’s basket, but how do we tamper with it? Let’s go back to Burp Suite and study the HTTP request and response flow. Notice that, besides viewing your own basket, adding items to our basket requires a “BasketId” parameter. This is the key to the attack. What if we modify the “BasketId” before sending the request? Will we be able to modify another user’s basket successfully? The short answer is yes, but it is not as easy as it sounds.


But before we do the attack, we have the following in basket #3. Remember, our basket is basket #6.

Burp suite 4

Now, let’s modify the “add to basket” request and change the “BasketId” to a different number. However, you will notice that trying to change it won’t modify the basket content of our target.

Burp suite 5

So, what should we do? There are many things you can try, but to cut a long story short, you might discover that adding a second “BasketId” would push the request and modify our target’s basket as well.

Burp suite 6

This tells us that if the backend interprets the requests, and if it finds another “basketID,” it will apply the same action to it. Do you see where I’m going with this? Perhaps adding more “basketID” values would enable a multi-basket attack, but I will leave that for you to try.


This means that ignoring access control measures can lead to numerous issues in your web application, potentially affecting multiple accounts by disclosing sensitive information or, as in our case, the contents of a user’s basket.


Forged user reviews

In Juice Shop, as with almost every e-commerce site, users are allowed to write and submit reviews. This generally benefits both the store owner and enhances the overall user experience. But what if someone could forge a user review? What if a customer review was written and attributed to someone else, perhaps a high-profile user of the site? That would greatly affect the product’s performance, right? This is what we wanted to achieve here: post a user review and attribute it to a different user.


Now, you’ll notice that whenever you write and submit a product review, this PUT request is sent.

Burp suite 7

Remember our previous attack that affected another user’s basket? How about the attack where we found the admin email address (see Gaining Privileged Access)? Let’s test that. What would happen if we modify the author before sending it to the endpoint? Would that change the author itself? Let’s see.

Burp suite 8

And what do you know, we were able to post a review using a different user! And we can confirm that by browsing the exact product in the web application.

Burp suite 9

So, the lesson here? Yes, broken access control also helps attackers forge account actions.


Directory enumeration and restricted file download

One common pitfall of improperly implemented access control is that restricted directories and their included files become accessible for download. This vulnerability is often found in applications rushed to production or those that don’t undergo regular security testing. While this may be harder to find in the real world today, this vulnerability still exists in some web applications. But fret not, Juice Shop exhibits this weakness.


If you’ve explored Juice Shop before, you might have stumbled upon various directories, including the `/ftp/` directory. You’ll notice that accessing this directory reveals a number of files without requiring any additional authentication. You can even access some of the files enumerated.

Localhost

Clearly, some of these files are not intended to be accessed, which in itself indicates an access control violation.


If you further explore the directory, you’ll discover that attempting to access files with extensions other than “.md” or “.pdf” results in a restriction notification. As curious individuals, we’ll want to bypass this. Fortunately, Juice Shop is vulnerable to null-byte injection.

Owasp juice shop 6

Null-byte injection is essentially an implementation-related vulnerability stemming from a weakness in the framework, underlying library, logic, or a combination of all these three. To perform a null-byte injection, we need to append a null-byte (`%00`) to the filename, hoping that the application won’t sanitize our request.

Owasp juice shop 7

Initially, adding `%00` to the end of the URL might not yield results, perhaps because the server expects a valid file extension. To address this, let’s append a `.pdf` extension.

Owasp juice shop 7 (1)

Still not working, right? Perhaps something is blocking our request. Let’s see if encoding will help us get through. Let us encode % and see what happens.

Localhost 2

Well, what do you know, it works! Now we can access the restricted file and see its content. Clearly this is a violation of access controls.


How to Prevent Broken Access Control?

If you’re building or maintaining web applications, Broken Access Control (BAC) is one of the most important risks to address. Here’s what you can do to avoid the issues above:


Enforce Access Controls on the Server Side

  • Don’t rely on client-side code or hidden links.
  • Every sensitive operation should include server-side checks against the user’s authenticated identity and role.

Use Context-Aware Authorization and Centralize Access Control Logic

  • Implement logic that not only checks the user’s role but also whether the user owns the resource in the specific transaction context. For example, confirm “user.id == order.ownerId” before returning order data.
  • Centralize your authorization logic into a single reusable library or service. This ensures that robust authorization rules are applied consistently. This also simplifies maintenance.


Adopt a “Deny by Default” and Least Privilege Principle

  • Don’t assign admin rights unless explicitly needed.
  • Make roles granular and restrictive by default.


Implement Indirect and Unpredictable Resource Identifiers

  • Use randomly generated identifiers like UUIDs/GUIDs.
  • Implement an indirect reference map that translates a public identifier to a real database ID only after the authorization check has passed.


Apply Rate Limiting and Throttling

  • Apply rate limiting to endpoints, especially to sensitive ones such as authentication and data access, to slow down attackers trying to bruteforce identifiers
  • Block IPs or users that exhibit anomalous behavior or exceed reasonable request thresholds


Implement a Secure Development Lifecycle (SDLC)

  • Include security unit tests and access control checks as part of your CI/CD pipeline.
  • Use test accounts with varying roles to test for both vertical and horizontal privilege escalation.


Monitor and Log Access Violations

  • Set up alerts for unusual access patterns or repeated unauthorized attempts.
  • Log every access control failure, including the user, IP address, and specific resource they are trying to access.


Perform regular security assessments

  • Perform regular Web Application Penetration Tests (VAPT) against your web applications.
  • Engage qualified professionals to perform penetration testing at least annually or after any significant changes to the environment.


Final Thoughts

Broken Access Control topped the OWASP Top 10 list for a reason: it’s one of the most common and dangerous issues that plague web applications. While OWASP Juice Shop is intentionally vulnerable, the lessons it teaches are very real. If you are a developer, product owner, or cybersecurity professional, the insights from Juice Shop offer a humbling reminder of why access controls must be built defensively and verified thoroughly.


Looking for support to assess your web applications? If your goal is to get a real-world, adversarial assessment of your security posture, including your access controls, Scrubbed can help you perform Web Application Penetration Testing. We can test Broken Access Controls and other vulnerabilities to help you secure your applications.


Not your cup of tea? We also offer other information security related services such as IT audit, Security Awareness Training, and SOC assessment support.


Get started in securing your organization. Contact us at https://content.scrubbed.net/contact-us/ (Risk Advisory).

Related Content

Blogs

How to Scale a Fractional CFO Practice: Infrastructure, AI, and Execution

How to Scale a Fractional CFO Practice: Infrastructure, AI, and Execution

At A GlanceFractional CFOs scale by separating strategy from daily execution. At the CFO Leadership Conference in Boston, panelists outlined the model: a three-part team structure, AI tools for repetitive analysis, and strict scope boundaries. The common thread is that strategic capacity depends on reliable accounting operations underneath it.Fractional CFOs operate in a fundamentally different model, balancing multiple clients and shifting priorities without the benefit of deep organizational embedding. You are hired to provide altitude, clarity, and rapid impact. But when a client lacks a mature finance operation, that executive focus is quickly consumed by operational cleanup.This exact tension took center stage at the CFO Leadership Conference in Boston. During our morning panel discussion, The Multi-Business Executive: How Fractional CFOs Scale Leadership Across Clients, moderated by Scrubbed’s Accounting Director Arian David, Triangle Coffee founder and fractional CFO Ottavio Siani and Scrubbed’s CFO Aira Pineda detailed how fractional CFOs build capacity to avoid this operational trap. They mapped out the real-world infrastructure and AI practices required to support multiple fast-moving client environments.Here are the operational realities shared in the room.The Infrastructure Blueprint for Scaling a Fractional CFO PracticeA primary challenge for scaling organizations is the gap between strategic desires and foundational accuracy. Volume increases faster than structure, and founders frequently bottleneck their own operations by micromanaging the finance function.As Aira shared with the room, stepping into a fractional role often means untangling founder-led accounting and directly telling the CEO, "you're not supposed to do this". Once leaders step back from the daily execution, "suddenly they have time" to actually focus on growing their business.Successful practitioners build a deliberate team architecture to handle the volume. To build a sustainable infrastructure, Ottavio explained that a fractional CFO setup requires three key elements:A fractional CFO to provide strategic direction.A trusted internal employee to manage sensitive operational context.An external accounting firm to run the daily numbers.This structure prevents the CFO from becoming the operational bottleneck.Read: Are Fractional CFOs the Future for Growing Companies?Navigating Risk in Founder-Led EnvironmentsThe most pointed friction in a fractional role often comes from enforcing structure. During the session, an audience member challenged the panel on how to balance strict risk controls with the commercial reality of working for independent founders who operate as the "gods of their own businesses".Aira addressed this tension directly, clarifying that operational controls and commercial growth do not have to collide. "I don't think it's contradictory, to be honest. I think it's complementary," she explained. "I think you make better decisions as a CFO, having kind of just at the back of your mind that risk mindset."Taking calculated risks is necessary to create shareholder value. However, a fractional CFO can only support that aggressive growth when the foundational accounting operations are secure enough to absorb the complexity.Building Fractional CFO Capacity with AI ToolsTechnology accelerates this architecture when carefully managed. Ottavio shared how he uses Claude to generate monthly financial statement analyses based on tested templates, reducing a repetitive task to minutes. Arian detailed using Claude to abstract private equity contracts, while Aira highlighted using NotebookLM to summarize 50-page forensic documents.However, systems create results, but human professionals must validate them. Aira illustrated the danger of false confidence by testing a complex revenue recognition issue across Claude, Gemini, and ChatGPT. Although all three models provided the exact same answer, they failed the final human review when "A big CPA firm comes and says, no, that's not the accounting treatment."Designing Aligned Execution and Preventing Scope CreepGrowth adds complexity. Strong execution ensures that complexity remains manageable. When fractional leaders possess a reliable accounting layer, closes become predictable and strategic conversations gain traction.Without this layer, scope creep inevitably takes over. "I think a challenge with being a fractional CFO is having to limit your scope, right?" Ottavio noted. "I typically dedicate like a day a week, and I need to keep myself from spending too much time outside of the original scope that we, we agreed upon, so that I can make sure that I'm kind of meeting all my clients".Key Takeaways:A sustainable fractional CFO practice separates strategy from execution: the CFO, a trusted internal employee, and an external accounting team each hold a distinct role.Founders bottleneck their own operations by staying in the daily accounting. Helping them step back frees time for growth.Risk mindset and commercial growth are complementary. Calculated risks require stable accounting operations underneath them.AI tools like Claude and NotebookLM compress repetitive analysis from weeks to minutes, but experienced professionals must verify every output against source documents.Scope discipline holds only when a reliable accounting layer runs the day-to-day work.About the PanelistsArian David | Accounting Director, Scrubbed Arian serves as the Accounting Director for Retail and Distribution at Scrubbed. She brings over 12 years of specialized execution experience managing complex accounting operations across the distribution, e-commerce, and retail sectors. Aira Pineda | CFO, Scrubbed Aira directs financial strategy and operations as the Chief Financial Officer at Scrubbed. She brings over a decade of hands-on experience operating as a fractional CFO for small to medium-sized enterprises.Ottavio Siani | Fractional CFO & Founder, Triangle Coffee Ottavio is the founder of Triangle Coffee, a multi-location café business operating in Boston and Washington, D.C. As an active fractional CFO, he advises a portfolio of clients, including Hon, CN Naturals, and Port of Mocha, on building and restructuring finance teams. 

Read More >
Blogs

Scaling Your Finance Function: When to Hire a Fractional Finance Team

Scaling Your Finance Function: When to Hire a Fractional Finance Team

At A GlanceAs noted at the CFO Leadership Conference, volume often outpaces structure, quietly straining finance execution. To scale capacity, growing companies can integrate partner-led finance teams anchored by an internal liaison. By taking responsibility for this daily execution, these professionals restore predictable reporting and give leaders their focus back.For many middle-market companies, there is a distinct moment when the finance function shifts from supporting the business to struggling to keep up. Transaction volume increases. Deadlines tighten. The close starts taking longer, and reviews feel rushed. Internal teams spend more time fixing issues than moving forward.During our afternoon panel at the CFO Leadership Conference in Boston, How CFOs Use Fractional Talent to Scale the Finance Function, Triangle Coffee founder and Fractional CFO Ottavio Siani, Scrubbed’s CFO Aira Pineda, and Accounting Director Arian David unpacked a critical reality for growing organizations. Building a finance organization that can flex with the business requires deliberate structural choices.Here is a closer look at how to architect that structure by integrating partner-led finance teams.When to Hire: The 160-Hour ThresholdPrompted by Arian to define the trigger point for bringing on fractional help, Scrubbed CFO Aira Pineda highlighted a practical threshold: evaluating whether a role truly demands a full-time, 160-hour-per-month commitment. This evaluation is a cornerstone strategy for companies navigating new growth stages. Fast-moving projects often require immediate, specialized execution. "Sometimes I need a project very quickly done, and I need someone experienced already," Aira explained. "I don't want to go through the headache [of hiring full-time]. A fractional team just makes it faster for me."Partner-led finance teams offer a cost-effective alternative to full-time hiring, providing the exact capacity needed without the overhead of onboarding. They take responsibility for the work behind your numbers, allowing the internal team to focus on strategic growth.Full-Time vs. Fractional Finance Team ComparisonFeatureFull-Time Finance HireFractional Finance TeamCapacity CommitmentOnboarding & Ramp TimeBilling ModelSpecialization160+ hours/month (Fixed)60–90 daysAnnual Salary + Benefits + EquityGeneralist executionFlexible / Scalable capacityImmediate deploymentFlat Monthly RetainerMulti-disciplinary experts Best Used For Continuous daily operations Fast growth, specialized projects, scalingThe Architecture of Integration: The "Bridge" PersonA fractional finance team cannot work effectively in isolation.Fractional CFO Ottavio Siani, who systematically leverages these exact structures across multiple ventures to scale his own executive leadership,  identified a critical requirement for successful integration: designating an internal "bridge" person.This full-time employee acts as the primary point of contact between the company and the fractional team. They do not need deep accounting expertise. Their value lies in providing internal context and answering day-to-day questions while the company operates. When communication paths and responsibilities are clearly defined, fractional professionals can operate as an extension of the internal finance function rather than as a disconnected outside vendor.Best Practices for Integrating a Fractional Finance TeamA fractional finance function only succeeds when it is treated as an integrated part of the business.The Standard of Accuracy: Accuracy is a non-negotiable requirement. As Aira noted during the panel discussion, "We work with numbers, and accuracy matters. If we end up, as a CFO, presenting a wrong number to our board... that is grounds for termination."Match the Billing Model to the Engagement: While hourly billing is common for initial testing, Ottavio strongly advocated for flat-fee models to maintain strategic alignment. "The problem with hourly billing is the company ends up being pretty precious with your time, and you'll often be held out of important meetings," Ottavio noted. "Retainer-based [billing] leads to a much healthier relationship."Demand Verified Data Controls (SOC 2): Handing over financial workflows requires absolute trust. Middle market businesses must partner with CPA firms that maintain rigorous, verified controls, such as a SOC 2 audit, to guarantee data security.Scaling with Technology and Distributed TalentA fractional model also allows companies to broaden the talent pool available to the finance function.Distributed teams can provide access to specialized skills, additional coverage, and capacity that adjusts as the business changes. However, location alone does not determine whether the model will work.Quality depends on how the team is managed, how communication is structured, how the work is reviewed, and whether the provider understands the company’s accounting requirements and operating environment.Technology can further expand the team’s capacity.During the panel, Aira described analytics teams using AI-assisted tools to write Python code and process data more efficiently than manual Excel workflows would allow. The value is not simply that the technology moves faster. It reduces repetitive work, so finance professionals can spend more time reviewing outputs, investigating exceptions, and applying judgment.Technology can accelerate the work. Accountability remains human.Building the Right Finance StructureFractional support works best when it solves a defined structural need. The company must still establish internal ownership. Responsibilities must be clear. Workflows must be documented. Review standards must be understood by both teams. When those elements are in place, a fractional finance team can help the business:Add capacity without immediately adding permanent headcount.Access specialized expertise.Support periods of rapid growth or transition.Make the close and reporting process more predictable.Reduce pressure on internal finance leaders.Create a stronger foundation for future hiring.The objective is not to outsource responsibility. It is to build a finance function with the right capacity, expertise, and structure for the company’s current stage of growth.About the PanelistsArian David | Accounting Director, Scrubbed Arian serves as the Accounting Director for Retail and Distribution at Scrubbed. She brings over 12 years of specialized execution experience managing complex accounting operations across the distribution, e-commerce, and retail sectors. Aira Pineda | CFO, Scrubbed Aira directs financial strategy and operations as the Chief Financial Officer at Scrubbed. She brings over a decade of hands-on experience operating as a fractional CFO for small to medium-sized enterprises.Ottavio Siani | Fractional CFO & Founder, Triangle Coffee Ottavio is the founder of Triangle Coffee, a multi-location café business operating in Boston and Washington, D.C. As an active fractional CFO, he advises a portfolio of clients, including Hon, CN Naturals, and Port of Mocha, on building and restructuring finance teams. 

Read More >
Blogs

Exclusive Survey Insights 2024: Accounting Staffing Strategies Research with the Center for Accounting Transformation

Exclusive Survey Insights 2024: Accounting Staffing Strategies Research with the Center for Accounting Transformation

We’re excited to share exclusive insights from our recent webinar on “Accounting Staffing Strategies Research,” hosted by Donny C. Shimamoto, CPA, CITP, CGMA, and Rizza De Guzman, CPA, Scrubbed PFSS Director.Scrubbed partnered with Donny C. Shimamoto ,the Center for Accounting Transformation  to survey CPA firms and with Dr. Bryan Coleman leading the research. The aim was to understand the significant challenges posed by staffing shortages and the innovative strategies firms are employing to address them.Missed the webinar? Watch it here.Recap: Overcoming Staffing ChallengesIn today’s dynamic market, CPA firms encounter notable obstacles in acquiring qualified talent. Our webinar delved into these challenges head-on, highlighting:Shortage of Skilled Candidates: Finding skilled individuals can be a significant hurdle.Rising Salary and Benefit Costs: Offering competitive compensation packages is essential for attracting and retaining top talent.Increased Competition from Other Firms: Fierce competition among firms intensifies as they compete for the same pool of qualified professionals.The Power of Outsourcing with ScrubbedScrubbed offers a powerful solution to these staffing challenges through our outsourced accounting and finance services. Partnering with us can help you:Bridge Talent Gaps: Fill staffing gaps seamlessly and efficiently.Access a Wider Talent Pool: Tap into a diverse network of qualified professionals with experience in key areas such as risk and SOX compliance , and corporate finance advisory.Free Up Internal Resources: Empower your in-house team to focus on core business activities.Watch the On-Demand WebinarExciting news! We’ve made the recording of our webinar available for you to watch. Now you can revisit the valuable insights and information shared during the session at your convenienceWatch: Accounting Staffing Strategies Research

Read More >

Contact Information

SF Bay Area Headquarters
111 Anza Boulevard, Suite 320, Burlingame, CA 94010, United States

Phone: (800)837-5160
Email: [email protected]

"Scrubbed" is the brand name under which Scrubbed Advisory, LLC and Scrubbed Assurance, LLP provide professional services. Scrubbed Advisory, LLC and Scrubbed Assurance, LLP practice in an alternative practice structure in accordance with the AICPA Code of Professional Conduct and applicable law, regulations, and professional standards. Scrubbed Assurance, LLP is a licensed independent CPA firm that provides attest services to its clients, and Scrubbed Advisory, LLC provides tax, finance, and support services to its clients. Scrubbed Advisory, LLC is not a licensed CPA firm.

Copyright © Scrubbed. All rights reserved.