Severity:

HIGH RISK

(7.3)

Improper Access Control in Student Result Management System

CVE-2026-2938

Analyzed

Vulnerability type

Category:

Improper Access Control

CWE:

CWE-266, CWE-284

Impact:

Unauthorized Modification of Application Configuration

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

The Student Result Management System 1.0 contains an access control weakness in the SMTP configuration update endpoint (/srms/script/admin/core/update_smtp.php).

Remote attackers may be able to modify email delivery settings without proper authorization, especially where authentication or privilege checks are missing or incomplete.

Affected context

This vulnerability affects deployments of the SourceCodester Student Result Management System 1.0 where the /srms/script/admin/core/update_smtp.php script is accessible over a network.

The issue is present when the application does not consistently enforce authentication and role-based authorization around administrative configuration endpoints.

In such environments, an attacker may be able to reach and interact with this script directly, bypassing intended admin-only controls.

Exploit preconditions

  • Attack surface: HTTP(S) endpoint /srms/script/admin/core/update_smtp.php exposed by the web application
  • Required access: Network access to the application; exploitation is possible if the endpoint lacks strict authentication/authorization checks
  • Trigger point: Sending crafted HTTP requests to the SMTP update script to change mail server parameters or related configuration
  • Why exploitation is possible: The endpoint relies on incomplete or missing access control enforcement, allowing configuration changes without ensuring the caller is an authenticated and authorized administrator

Why this happens

The underlying issue maps to CWE-284: Improper Access Control and CWE-266: Incorrect Privilege Assignment.

The SMTP configuration handler appears to expose sensitive administrative functionality without reliably confirming the user's identity and role or restricting access to trusted, privileged users.

Abstractly, the pattern is: a state-changing administrative function that is directly reachable and performs its operation based solely on input parameters, not on robust session, authentication, or privilege checks.

Potential impact

  • Attackers may change SMTP server addresses, ports, and credentials used by the application
  • Application email flows (password resets, notifications, result distributions) can be intercepted or redirected
  • Malicious emails could be sent from the application context, aiding phishing or abuse of trusted infrastructure
  • Disruption or denial of legitimate email delivery from the system
  • Potential leakage of SMTP credentials if error messages or logs expose configuration details

General mitigation guidance

Effective mitigation focuses on tightening and centralizing access control around administrative functions:

  • Ensure all configuration-changing scripts are protected by strong authentication and role-based authorization checks
  • Route sensitive operations through a centralized controller or admin panel that enforces consistent permission checks, rather than calling scripts directly
  • Apply the principle of least privilege so that only designated admin roles can modify SMTP and other core configuration settings
  • Use server-side access control (e.g., framework middleware, route guards) rather than relying solely on client-side navigation or hidden links
  • Consider separating public and administrative interfaces, limiting admin endpoints to restricted networks or VPN where feasible

How teams detect issues like this

Detection typically involves a mix of code analysis and behavioral monitoring:

  • Perform code review to identify configuration-related scripts that lack explicit session validation and role checks
  • Use static analysis rules or custom linters to flag direct access to administrative PHP scripts that do not invoke shared authentication/authorization components
  • Inspect routing and access control configuration to ensure all admin paths are covered by consistent policies or middleware
  • Analyze HTTP access logs for unauthenticated or unusual requests to /srms/script/admin/core/update_smtp.php and similar endpoints
  • Incorporate security testing (SAST/DAST) into CI pipelines to highlight endpoints where sensitive actions are not gated by robust access checks

Sources

SourceLink
github.comgithub.com/Shaon-Xis/SRMS-1.0---Unauthenticated-SMTP-Hijacking-to-Account-Takeover
vuldb.comvuldb.com/?ctiid.347310
vuldb.comvuldb.com/?id.347310
vuldb.comvuldb.com/?submit.755345
sourcecodester.comsourcecodester.com/

Frequently asked

questions

Yes. If the application is exposed over a network and the SMTP update endpoint is not properly protected, an attacker can exploit it remotely via crafted HTTP requests.

Not necessarily. The risk stems from missing or weak access controls. In some deployments, exploitation may be possible without any valid account; in others, a low-privileged account might be enough if role checks are incomplete.

Protect all administrative configuration endpoints behind robust authentication and role-based authorization. Route actions like SMTP updates through a central admin controller that enforces consistent access checks, instead of allowing direct script access.

Adopt a security-by-design approach where all privileged operations are centralized, consistently use framework-level access control mechanisms, and include access control reviews and automated checks in your development and deployment processes.

Find out what's already
exploitable in your codebase.