Severity:

HIGH RISK

(7.3)

Improper Access Control in JeecgBoot Login Department

CVE-2026-9580

Deferred

Vulnerability type

Category:

Improper Access Control

CWE:

CWE-266, CWE-284

Impact:

Unauthorized Access / Privilege Misuse

Severity:

HIGH RISK

(7.3)

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

JeecgBoot versions up to 3.9.1 contain an improper access control flaw in the LoginController.selectDepart endpoint, exposed at /sys/selectDepart.

Under certain conditions, remote users may be able to access or manipulate department-related login context without adequate authorization checks, potentially leading to unauthorized access to organizational resources.

Affected context

The vulnerability occurs in JeecgBoot deployments that expose the /sys/selectDepart endpoint as part of the login or post-login flow.

It primarily affects multi-department or multi-tenant setups where users can switch or select departments, and where the department selection logic influences permissions, data visibility, or session context.

The issue is present when authorization checks around department selection are incomplete, missing, or rely solely on client-supplied identifiers without robust server-side validation.

Exploit preconditions

  • Attack surface: Remote HTTP access to the JeecgBoot application, specifically the /sys/selectDepart route.
  • Required access: Ability to reach the login or department selection functions; in many cases, this may be available to unauthenticated or minimally authenticated users depending on configuration.
  • Trigger point: Sending crafted requests to LoginController.selectDepart to influence which department or context is bound to a user session.
  • Why exploitation is possible: The controller does not consistently enforce fine-grained access checks for the department being selected, allowing a user to bind or reference departments beyond their authorized scope.

Why this happens

The root cause aligns with CWE-284: Improper Access Control and CWE-266: Incorrect Privilege Assignment.

The LoginController.selectDepart function appears to trust user-supplied department identifiers or context without fully enforcing server-side authorization that ensures the caller is entitled to access the requested department.

This pattern results from missing or incomplete checks on who can select which department, and how that selection translates into privileges, leading to scenarios where user sessions may inherit access to resources they should not control.

Potential impact

  • Unauthorized viewing of data associated with other departments or tenants.
  • Escalation of privileges by switching into a department with broader permissions.
  • Bypassing intended segregation of duties or tenant isolation boundaries.
  • Indirect compromise of sensitive business workflows that rely on department scoping for access control.

General mitigation guidance

Mitigation typically focuses on ensuring that department or context selection is always subject to strict server-side authorization.

Common defensive patterns include:

  • Binding department selection strictly to the authenticated user's allowed department list, resolved on the server side rather than from client input.
  • Implementing centralized access control checks that evaluate whether a user is permitted to enter or operate within a given department context.
  • Treating all context-switching endpoints (such as tenant or department selectors) as privileged operations requiring explicit authorization and auditing.
  • Applying the principle of least privilege so that selecting or switching departments never results in broader permissions than necessary.

How teams detect issues like this

Organizations can detect similar access control weaknesses via:

  • Static analysis rules that flag controller methods which change security context (e.g., department, tenant, role) without explicit authorization checks.
  • Code reviews focusing on login and context-switch logic, verifying that every transition in department or tenant state passes through centralized access control enforcement.
  • Runtime logging and monitoring of department selection events, looking for anomalous patterns such as frequent cross-department switches by the same user.
  • Automated security testing (e.g., authorization testing tools) that attempt to select departments outside the user's normal scope and flag positive responses.

Sources

SourceLink
github.comgithub.com/jeecgboot/JeecgBoot/
github.comgithub.com/jeecgboot/JeecgBoot/issues/9597
github.comgithub.com/jeecgboot/JeecgBoot/issues/9597#issuecomment-4385501959
github.comgithub.com/jeecgboot/JeecgBoot/releases/tag/v3.9.2
vuldb.comvuldb.com/submit/817892
vuldb.comvuldb.com/vuln/365636
vuldb.comvuldb.com/vuln/365636/cti

Frequently asked

questions

The vulnerability is remotely exploitable wherever the /sys/selectDepart endpoint is exposed and not protected by strict access controls, especially in multi-department environments.

It depends on the deployment's configuration; some setups may require at least a basic login, while others could expose the department selection endpoint too broadly. The core issue is insufficient authorization on the department selection itself.

Enforce server-side authorization in the department selection logic so that only departments explicitly associated with the authenticated user can be selected, using centralized access control checks rather than trusting client-provided identifiers.

Treat all context-switching functions (department, tenant, role) as privileged operations, require explicit authorization and auditing, and integrate security reviews or automated checks focused on access control paths during development and code review.

Find out what's already
exploitable in your codebase.