/

CVE-2026-57950

Severity:

HIGH RISK

(8.1)

Broken Access Control (CWE-863) in Ruoyi ErpSaleOrder API

CVE-2026-57950

Deferred

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-863

Impact:

Privilege Escalation and Unauthorized Data Access

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A broken access control flaw in the Ruoyi Vue Pro ErpSaleOrderController lets users with shipment-level erp:sale-out permissions access and manipulate sale order operations intended for the erp:sale-order namespace.

Under misconfigured namespace enforcement, attackers can create, modify, delete, and read financially sensitive sale orders without possessing the correct business-role permissions.

Affected context

This vulnerability appears in Ruoyi Vue Pro ERP modules where HTTP controller endpoints guard business operations using permission namespaces.

It manifests when the ErpSaleOrderController checks for erp:sale-out shipment permissions instead of the stricter erp:sale-order namespace for sale order actions.

Environments that grant shipment-level roles broad access, or reuse permission codes across modules, are more exposed to unintended access paths.

Exploit preconditions

  • Attack surface: HTTP API endpoints exposed by ErpSaleOrderController (web UI or REST calls).
  • Required access: Valid application account with assigned erp:sale-out permission (shipment-level role).
  • Trigger point: Invoking sale order create, update, delete, or read endpoints that incorrectly validate erp:sale-out instead of erp:sale-order.
  • Why exploitation is possible: Authorization checks rely on the wrong permission namespace, allowing roles scoped to shipment operations to pass checks designed for sale order operations.

Why this happens

The core issue is misaligned authorization logic—business operations for sale orders are guarded by a permission string intended for shipment operations.

This maps to CWE-863: Incorrect Authorization, where the system validates access using an inappropriate or overly broad privilege, breaking the intended separation between financial and logistics roles.

At a pattern level, the controller couples endpoint protection to string-based permission codes without centralized verification, increasing the risk that a typo or copy-paste error silently widens access.

Potential impact

  • Attackers with shipment-level permissions may create unauthorized sale orders.
  • They could update existing sale orders to manipulate pricing, quantities, or customer details.
  • They can delete legitimate sale orders, disrupting financial records and audit trails.
  • They may read sensitive financial and customer information embedded in sale orders.
  • They could indirectly impact downstream invoicing, revenue reporting, and compliance processes.

General mitigation guidance

Mitigation generally focuses on tightening and centralizing authorization rules around business operations.

Useful patterns include:

  • Enforcing role-appropriate permission namespaces for each controller, separating shipment, sales, finance, and administrative scopes.
  • Driving authorization decisions from a centralized policy layer or RBAC engine instead of scattered string checks in controllers.
  • Applying least-privilege principles when defining roles, ensuring shipment roles cannot indirectly cover financial operations.
  • Adding consistency checks or unit tests for permission mappings so that every endpoint is bound to its intended namespace.
  • Using coarse-grained business capabilities (e.g., "manage sale orders") rather than reusing similar-sounding permission codes across modules.

How teams detect issues like this

Detection typically relies on combining code-level inspection with policy analysis:

  • Static analysis or custom linters can flag controllers whose permission codes do not match the domain they serve (e.g., sale order endpoints protected by shipment permissions).
  • Security-focused code reviews can cross-check each endpoint's authorization annotation against a canonical permission catalog.
  • RBAC policy audits can look for roles that unexpectedly allow access to finance-related operations via shared or reused permission strings.
  • Automated tests can assert that users with specific roles (e.g., shipment-only) cannot perform financial actions, catching regressions early.

Sources

SourceLink
github.comgithub.com/YunaiV/ruoyi-vue-pro/commit/5d1fd70dc3e61bf64e7ce3328a71cc60001175c6
github.comgithub.com/YunaiV/ruoyi-vue-pro/issues/1161
vulncheck.comvulncheck.com/advisories/ruoyi-vue-pro-incorrect-permission-namespace-in-erpsaleordercontroller

Frequently asked

questions

Any authenticated user who has been granted erp:sale-out shipment permissions can potentially reach sale order operations that should be restricted to erp:sale-order roles.

No. Exploitation only requires shipment-level access; administrative or finance roles are not needed because the controller enforces the wrong permission namespace.

Align each endpoint's authorization check with its correct business namespace, centralize permission definitions, and ensure sale order operations are guarded exclusively by erp:sale-order or equivalent finance-focused permissions.

Adopt centralized RBAC policies, avoid copy-pasted permission strings in controllers, enforce least-privilege roles, and add automated tests and reviews that validate permission mappings against a documented access control model.

Find out what's already
exploitable in your codebase.