CWE-863: Incorrect authorization | Causes and Fixes Skip to content

Security weaknessCWE Top 25 · #17

CWE-863 Incorrect authorization

Your site checks permissions, but the check is flawed, so some users get access they should not have.

  • Senior security engineers
  • 540+ projects delivered
  • Reply within one business day

Quick answer

What is CWE-863?

Incorrect Authorization: The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.

Business impact

What CWE-863 could cost your business

MITRE documents what this weakness can do. Here is what that means for a website, store or app.

Confidentiality

Private data exposed

Customer records, credentials, orders or internal files can be read by people who should never see them.

  • Read Application Data
  • Read Files or Directories
  • Execute Unauthorized Code or Commands

Integrity

Data, pages or code changed

Prices, orders, content or the code your site runs can be altered without your approval.

  • Modify Application Data
  • Modify Files or Directories
  • Execute Unauthorized Code or Commands

Availability

Downtime and lost sales

Crashes, slowdowns or exhausted resources can take your site, store or app offline.

  • Execute Unauthorized Code or Commands
  • DoS: Crash, Exit, or Restart
  • DoS: Resource Consumption (CPU)

Access Control

Accounts and admin areas exposed

Logins and permission checks can be bypassed, putting admin and customer accounts at risk.

  • Gain Privileges or Assume Identity
  • Bypass Protection Mechanism

In plain English

What Incorrect authorization means for your business

  • 540+projects delivered
  • 9+years in business
  • 23+certified experts
Get a free security check

A senior engineer replies within one business day.

With incorrect authorization, an access check exists but gets the answer wrong. It may test the wrong thing, such as whether you are logged in rather than whether you own the record. It may trust a value the user controls, such as a role sent in the request. It may cover the web page but not the API behind it. The result is the same: someone passes a check they should have failed.

This weakness is harder to spot than a missing check, because the code looks protected and passes a casual review. The business impact is the same kind of exposure. One customer can view or edit another customer’s data. A staff account can reach owner-level functions. In multi-tenant software, where many clients share one system, a single wrong comparison can leak data between companies. That can breach contracts and privacy obligations.

Where it shows up

  • Stores and portals that confirm a user is logged in but not that the order, invoice or support ticket being requested belongs to them.
  • Applications that read the user’s role or account ID from a cookie, hidden form field or request body instead of from the server-side session.
  • WordPress plugins that check a capability too broad for the action, so contributors or subscribers can do what only administrators should.
  • SaaS products where list pages filter by tenant correctly, but export, search or bulk-edit endpoints forget to apply the same filter.

Free security check

Is CWE-863 hiding in your site?

A senior engineer checks your site, store or app for this weakness and the rest of the CWE Top 25, then sends a prioritized fix plan within one business day. No obligation.

Official definition

How MITRE defines CWE-863

Incorrect Authorization

The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.

Also known as: AuthZ

Weakness ID
CWE-863
Type
Class
Status
Incomplete
Likelihood of exploit
High
Applies to
Go, Web Server, Database Server
Introduced during
Architecture and Design, Implementation, Operation
2025 CWE Top 25
Rank 17

Fix it

How to fix Incorrect authorization

Practical steps in priority order. Share them with your developer or agency.

  1. Decide access on the server

    Take the user’s identity, role and tenant from the server-side session or a verified token. Never trust a role, price tier or account ID that arrives in a cookie, hidden field, header or request body.

  2. Check the specific object and action

    Authorize each request against the exact record and the exact operation, for example whether this user may edit this order. Being logged in, or holding a role in general, is not enough.

  3. Use one shared policy layer

    Define permissions in a single policy module, middleware or authorization library and call it from pages, APIs, exports and background jobs alike. This keeps every path to the same data under the same rule.

  4. Apply least privilege to roles

    Review each role and remove permissions it does not need. In WordPress, map custom actions to the narrowest capability that fits. Use deny-by-default so anything not explicitly granted is refused.

  5. Test the permission matrix

    Write automated tests for each role against each sensitive action, including cross-account and cross-tenant attempts. Run them in continuous integration so a refactor that weakens a check fails the build.

Signs you may be affected

  • Users in a lower role can complete a restricted action by calling the API directly.
  • Permission rules are written differently in each controller instead of in one shared place.
  • Access decisions depend on values sent by the browser, such as a role or user ID.

Questions to ask your developer

  • Where do our access rules live, and is every endpoint using the same ones?
  • Does the server ever trust a role or user ID sent by the browser?
  • Do we have tests proving one customer cannot reach another customer’s data?

Prevention

What MITRE recommends, phase by phase

Every mitigation from the CWE entry, in the order a project runs: plan, build, test, operate.

  1. 01

    Architecture and Design

    • Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from.
    • Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be.
    • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
    Show 1 more recommendation
    • For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict.
  2. 02

    Installation

    • Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.

Detection and evidence

How CWE-863 is found, and where it has hit

The testing methods MITRE recommends, and real vulnerabilities this weakness has caused.

How it is detected

  • Automated Static AnalysisAutomated static analysis is useful for detecting commonly-used idioms for authorization. A tool may be able to analyze related configuration files, such as .htaccess in Apache web servers, or detect the usage of commonly-used authorization libraries. Generally, automated static analysis tools have.
  • Automated Dynamic AnalysisAutomated dynamic analysis may not be able to find interfaces that are protected by authorization checks, even if those checks contain weaknesses.
  • Manual AnalysisThis weakness can be detected using tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session. Specifically, manual static analysis is useful for evaluating the.
  • Manual Static Analysis – Binary or BytecodeAccording to SOAR [REF-1479], the following detection techniques may be useful: Binary / Bytecode disassembler – then use manual analysis for vulnerabilities & anomalies
  • Dynamic Analysis with Automated Results InterpretationAccording to SOAR [REF-1479], the following detection techniques may be useful: Web Application Scanner Web Services Scanner Database Scanners

Real vulnerabilities it caused

  • CVE-2025-24839collaboration platform allows attacker to access an AI bot by using a plugin to set a critical property
  • CVE-2025-32796LLM application development platform allows non-admin users to enable or disable apps using certain API endpoints
  • CVE-2021-39155Chain: A microservice integration and management platform compares the hostname in the HTTP Host header in a case-sensitive way (CWE-178, CWE-1289), allowing bypass of the authorization policy (CWE-863) using a hostname.
  • CVE-2019-15900Chain: sscanf() call is used to check if a username and group exists, but the return value of sscanf() call is not checked (CWE-252), causing an uninitialized variable to be checked (CWE-457), returning success to allow.
  • CVE-2009-2213Gateway uses default "Allow" configuration for its authorization settings.
  • CVE-2009-0034Chain: product does not properly interpret a configuration option for a system group, allowing users to gain privileges.

How we fix it

From finding to fixed: how Codefreex closes CWE-863

  1. Scan and confirm

    We test your site, store or app for this weakness and the rest of the CWE Top 25 with automated scanning and manual review, and confirm what is actually exploitable.

  2. Fix at the source

    We change the code, configuration or dependency that causes it, not just the symptom, and plan the changes to avoid downtime.

  3. Verify the fix

    We retest every finding, check that nothing else broke and hand you a short report you can share with your team, client or auditor.

  4. Keep it fixed

    Updates, monitoring and maintenance so the weakness does not return with the next plugin, theme, app or code change.

Related weaknesses

FAQ

CWE-863: FAQs

Short answers for owners and developers. Not sure whether your site is affected? Ask us to check.

How is incorrect authorization different from missing authorization?

With missing authorization, no check runs at all. With incorrect authorization, a check runs but its logic is wrong or incomplete. It may verify login instead of ownership, trust data from the browser, or protect one route while a second route to the same data is left open. Both let users exceed their permissions.

What is the business impact of incorrect authorization?

It exposes data and functions to the wrong people. That can mean customers seeing each other’s records, staff changing things reserved for owners, or one client’s data leaking to another in shared software. MITRE rates the likelihood of exploitation as high. The cost usually shows up as privacy notifications, contract issues and lost trust.

How do I prevent incorrect authorization?

Base every decision on server-side identity. Check the specific record and action, not just the login or role. Put the rules in one shared layer used by every route. Default to deny. Then test the full matrix of roles and actions automatically, and include access control in code review for every new feature.

What is CWE-863?

CWE-863, “Incorrect Authorization”, is a software weakness catalogued by MITRE in the Common Weakness Enumeration. The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.

How serious is CWE-863?

MITRE rates the likelihood of exploit as High. It can affect confidentiality, integrity, access control, availability, with impacts such as read application data, read files or directories, modify application data. It ranks number 17 on the 2025 CWE Top 25 Most Dangerous Software Weaknesses. The real risk depends on where the weakness sits and what data or functions it exposes.

How do you prevent CWE-863?

Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate. Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files.

Can Codefreex check my site for CWE-863?

Yes. A senior engineer reviews your site, store or app for CWE-863 and the rest of the CWE Top 25, confirms what is exploitable and sends a prioritized fix plan within one business day. Start with the free security check form on this page.

Free security check

Find out if CWE-863 affects your site

Send your URL. A senior engineer checks for this weakness and the rest of the CWE Top 25, and replies within one business day with what to fix first.

  • A senior strategist reviews your request, not a sales bot
  • Clear scope, timeline and estimate within one business day
  • Free 30-minute discovery call, no obligation
  • NDA available on request

Weakness data from the Common Weakness Enumeration (CWE®) version 5.0, Copyright © 2006–2026, The MITRE Corporation. CWE is free to use by any organization or individual for any research, development, and/or commercial purposes under the CWE Terms of Use. CWE is a registered trademark of The MITRE Corporation. The business impact, risk profile and plain-English guidance on this page are written by Codefreex and are general information, not a security assessment of your system.