/

CVE-2026-35610

Severity:

HIGH RISK

(8.8)

Improper Authorization in PolarLearn Account Management

CVE-2026-35610

Analyzed

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-285

Impact:

Privilege Escalation and Account Takeover

Severity:

HIGH RISK

(8.8)

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

PolarLearn's account-management module contains an inverted admin check that misclassifies user roles when calling critical functions.

As a result, authenticated non-admin users can reset arbitrary account passwords and delete user accounts, while legitimate admins are blocked, leading to direct privilege escalation.

Affected context

This vulnerability affects PolarLearn deployments using the account-management module in versions 0-PRERELEASE-14 and earlier.

It appears in backend logic that enforces administrative permissions for operations such as resetting passwords (setCustomPassword(userId, password)) and deleting users (deleteUser(userId)).

The issue manifests when role checks are implemented with a logically inverted condition (e.g., rejecting admins and allowing non-admins) rather than correctly enforcing that only admin users can perform sensitive account-management actions.

Exploit preconditions

  • Attack surface: Application's account-management functionality (e.g., API endpoints or backend controllers) that expose setCustomPassword and deleteUser.
  • Required access: Any authenticated user account, even without administrative privileges.
  • Trigger point: Calling the affected operations with a target userId while the application relies on the flawed authorization condition.
  • Why exploitation is possible: The authorization check for "is admin" is inverted or incorrectly negated, so non-admin roles pass the check and are treated as authorized, while actual admins are rejected.

Why this happens

The core issue is an authorization logic error where a conditional intended to enforce admin-only access is implemented incorrectly.

Instead of validating that the caller has an administrative role before permitting sensitive actions, the code uses a reversed or negated condition (for example, denying admins and allowing everyone else).

This maps to CWE-285: Improper Authorization, in which access control decisions are based on incorrect logic or misapplied role checks, allowing users to perform operations outside their intended privilege level.

Potential impact

  • Non-admin users may reset passwords for arbitrary accounts, potentially leading to account takeover.
  • Non-admin users may delete other users' accounts, causing loss of data and denial of service for targeted users.
  • Disruption of administrative workflows, as legitimate admins are prevented from performing necessary account-management tasks.
  • Erosion of trust and regulatory compliance risks due to unauthorized access and modification of user accounts.

General mitigation guidance

Effective mitigation focuses on correct, centralized, and explicit authorization checks for sensitive operations:

  • Ensure that all admin-only functions (e.g., password resets for other users, account deletions, role changes) verify that the caller's role or permission set explicitly includes "administrator" or an equivalent privileged capability.
  • Prefer a centralized authorization mechanism (e.g., middleware, policy engine, or declarative access rules) instead of duplicating role checks across methods, reducing the risk of logical inversions.
  • Use positive logic checks (e.g., if user.isAdmin then allow) rather than complex negations or inverted conditions, and avoid relying on subtle boolean expressions for critical access control.
  • Implement least-privilege role design so that default user roles lack capabilities to manage other users' credentials or lifecycle.
  • Introduce defense-in-depth controls such as confirmation prompts and secondary validations for highly sensitive account-management actions.

How teams detect issues like this

Detection typically combines code-level review with behavioral testing:

  • Code review: Look for authorization conditions around sensitive methods like password changes, account deletion, and role assignments. Flag any inverted or ambiguous logic (e.g., if !isAdmin or complex boolean expressions determining admin access).
  • Static analysis: Configure rules to detect direct role checks in business logic (e.g., if (role != ADMIN) around admin-only methods) and highlight cases where access is granted on negative checks instead of positive assertions.
  • Policy enforcement: Use centralized authorization frameworks or policy-as-code (e.g., RBAC, ABAC, or dedicated policy engines) and enforce that all admin-level operations declare required privileges through a single mechanism.
  • Security testing: Include test cases where low-privileged users attempt to perform admin actions, verifying that requests are rejected and properly logged.

Sources

SourceLink
github.comgithub.com/polarnl/PolarLearn/security/advisories/GHSA-8hww-w7cc-77rj

Frequently asked

questions

Any authenticated non-admin user who can reach the affected account-management functions can exploit this issue. The impact is broad in multi-user deployments, since no special privileges beyond basic authentication are required.

The attacker only needs a standard user account. Once logged in, they can invoke the vulnerable operations to reset other users' passwords or delete accounts.

Correct the authorization logic so that only verified admin users can call setCustomPassword and deleteUser, preferably by using a centralized authorization mechanism that enforces role requirements declaratively for each sensitive operation.

Adopt clear, positive authorization checks for privileged actions, centralize access control in a shared framework or policy layer, include automated tests where non-admin users attempt admin-only operations, and incorporate secure code review focusing specifically on access control paths.

Find out what's already
exploitable in your codebase.