/

CVE-2026-10167

Severity:

HIGH RISK

(7.3)

Improper Authentication in BrinaryBrains School Student

CVE-2026-10167

Deferred

Vulnerability type

Category:

Improper Authentication

CWE:

CWE-287

Impact:

Authentication Bypass / Privilege Escalation

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

An authentication weakness in the BrinaryBrains School Student Management System allows improper handling of the role argument in the sign_auth_cookie function within application/controllers/Login.php.

Under certain conditions, a remote attacker can manipulate role information in authentication cookies, potentially gaining unauthorized access or privileges within the application.

Affected context

This issue affects deployments of the BrinaryBrains School Student Management System that use the MY_Controller component for login and session handling.

The vulnerability resides in the sign_auth_cookie function of application/controllers/Login.php, where user roles are incorporated into authentication cookies.

Environments in which the application is exposed over a network and cookies are accepted as a primary trust signal for user identity and role are most at risk.

Exploit preconditions

  • Attack surface: Remote web interface of the School Student Management System.
  • Required access: Ability to send crafted HTTP requests and control or influence the role argument during authentication or cookie creation.
  • Trigger point: Invocation of sign_auth_cookie where the role value is processed and embedded into the authentication cookie.
  • Why exploitation is possible: The authentication mechanism trusts role information derived from user-controllable input, and the cookie-signing or validation logic does not robustly bind role data to a server-side authority or enforce strict verification.

Why this happens

The underlying bug belongs to the class of Improper Authentication (CWE-287), where the application does not correctly verify a user's identity or associated privileges before granting access.

In this case, the sign_auth_cookie function appears to rely on a role parameter that can be manipulated, and the cookie-signing logic does not adequately ensure that the role is derived from trusted, server-side state.

By coupling authentication state too closely to client-provided values and insufficiently validating or constraining the role field, the system treats untrusted data as authoritative identity information.

Potential impact

  • An attacker may gain access to another user's account, depending on how roles map to identities.
  • An attacker could escalate privileges by obtaining a more privileged role (e.g., administrator, staff).
  • Unauthorized access to student records, grades, or administrative functions could occur.
  • Audit logs and accountability mechanisms may be undermined if actions appear to originate from spoofed roles.

General mitigation guidance

Mitigation strategies focus on making authentication and authorization decisions strictly server-driven and resistant to client-side tampering:

  • Tie all role and privilege decisions to server-side session or database records, rather than trusting client-provided role values.
  • Ensure authentication cookies contain only opaque, server-generated tokens that are verified against backend state, rather than embedding raw role information that influences access checks directly.
  • Use robust signing and integrity protection for cookies, and reject any cookie that fails signature or structural checks.
  • Normalize and validate role identifiers against a fixed, server-managed set before use, and avoid accepting arbitrary role values from requests.
  • Apply least-privilege design so that even if a cookie is misused, the exposed surface and accessible actions are minimized.

How teams detect issues like this

Detection efforts can focus on both code-level and runtime signals:

  • Static analysis: Search for authentication or session functions that accept role or privilege parameters directly from request data (e.g., POST/GET fields) and use them to construct cookies or session identifiers.
  • Code review: Flag any logic where roles are embedded in cookies or other client-controlled artifacts and then later trusted for authorization checks without revalidation on the server.
  • Logging and monitoring: Monitor for unusual patterns such as frequent changes in role assignments for the same client IP, or access attempts with inconsistent cookie states.
  • Security testing and policy enforcement: Define secure coding policies for authentication flows and enforce them through automated checks (e.g., lint rules or custom scanners) that prevent role-based decisions from being driven by untrusted inputs.

Sources

SourceLink
github.comgithub.com/OUSL-GROUP-BrinaryBrains/School-Student-Management-System/issues/24
vuldb.comvuldb.com/submit/819157
vuldb.comvuldb.com/vuln/367421
vuldb.comvuldb.com/vuln/367421/cti

Frequently asked

questions

Yes. The weakness can be exploited over the network by interacting with the application's login or authentication endpoints, as long as the attacker can influence the role parameter or related cookie data.

Typically, only unauthenticated or low-privileged access to the web interface is required, combined with the ability to send crafted HTTP requests. No direct server-side or database access is needed if the application accepts and signs manipulated role values.

Centralize authentication and authorization logic on the server, ensure that all roles and permissions are derived from trusted backend state, and treat cookies as opaque references to server-held sessions rather than as containers for decision-making data like roles.

Adopt a defense-in-depth approach for authentication: design session tokens as opaque, integrity-protected identifiers; enforce strict separation between identity verification and role assignment; and include security reviews of login and cookie-handling code in the development lifecycle, supported by automated checks that flag trust in client-supplied role or privilege data.

Find out what's already
exploitable in your codebase.