/

CVE-2026-36236

Severity:

CRITICAL RISK

(9.8)

SQL Injection in SourceCodester Engineers Online Portal

CVE-2026-36236

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Authentication Bypass and Data Compromise via SQL Injection

Severity:

CRITICAL RISK

(9.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

SourceCodester Engineers Online Portal v1.0 contains a critical SQL injection vulnerability in update_password.php through the new_password parameter.

An attacker who can reach this endpoint may manipulate database queries, potentially accessing or altering sensitive user data and compromising authentication workflows.

Affected context

This vulnerability arises in the password update workflow implemented by update_password.php in SourceCodester Engineers Online Portal v1.0.

The issue is present when user-supplied input from the new_password parameter is embedded directly into SQL statements without robust parameterization or sanitization.

The risk is most pronounced in deployments where the application is network-accessible and the database account used by the application has broad privileges over user or application data.

Exploit preconditions

  • Attack surface: Web-facing HTTP endpoint handling password updates (update_password.php).
  • Required access: Ability to send crafted requests to the password update function; this may be via authenticated or unauthenticated access depending on how the route is protected.
  • Trigger point: Submission of a specially crafted new_password value that is incorporated into an SQL query.
  • Why exploitation is possible: The application constructs SQL statements by concatenating or interpolating raw user input from new_password without using prepared statements, bound parameters, or rigorous input validation, allowing arbitrary modification of the SQL query structure.

Why this happens

The core issue is the construction of SQL queries using untrusted input from the new_password parameter without proper query parameterization.

This pattern aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where application code treats user-controlled strings as part of executable SQL logic.

Because the database layer interprets meta-characters and control tokens embedded in the input, an attacker can alter the intended query semantics—such as changing WHERE clauses, stacking additional statements (where allowed), or bypassing normal authentication and authorization checks.

Potential impact

  • Unauthorized reading of sensitive user information, such as account details or password hashes.
  • Modification or deletion of user records, including forced password changes or account lockouts.
  • Bypassing authentication or session integrity checks by manipulating password or user lookup queries.
  • Escalation of privileges within the application data model by altering role or permission fields.
  • In extreme cases, potential execution of database-level commands or full database compromise if the backend supports stacked queries and has high-privilege credentials.

General mitigation guidance

Meaningful mitigation focuses on eliminating dynamic SQL that incorporates raw user input and reducing the privileges and reach of database operations.

Recommended defensive patterns include:

  • Using parameterized queries or prepared statements for all database access, ensuring new_password is always bound as data rather than query syntax.
  • Centralizing database access in a data access layer that prohibits ad-hoc string concatenation for SQL statements.
  • Applying strict server-side validation and normalization to password fields, accepting only character sets and lengths appropriate for passwords and rejecting input that deviates from expected patterns.
  • Enforcing least-privilege principles for database accounts so that the application user cannot perform schema changes or access unrelated tables even if a query is abused.
  • Implementing a secure-by-default framework or ORM that handles escaping and parameter binding automatically and discourages direct raw SQL usage.

How teams detect issues like this

Detection efforts should aim to identify both the vulnerable query patterns in code and abnormal query behavior in production.

Common approaches include:

  • Static analysis rules that flag SQL execution functions where variables derived from HTTP parameters (such as new_password) are concatenated into query strings.
  • Code review checklists that require verification of prepared statements and bound parameters for all authentication and password management code paths.
  • Automated scanning tools (DAST) that send SQL-injection-style payloads to the update_password.php endpoint and monitor for error signatures, anomalous responses, or data leakage.
  • Database query monitoring and anomaly detection, such as alerts on unusual query shapes, sudden increases in error rates, or access to tables unrelated to the password update operation.

Sources

SourceLink
github.comgithub.com/Amorsec/CVE-PHP/blob/main/sourcecodester-Engineers_Online_Portal_in_PHP_update_password.php_sql_injection.pdf

Frequently asked

questions

Yes. If update_password.php is reachable over the network, an attacker can exploit this issue by sending crafted HTTP requests with malicious new_password values.

It depends on how the password update functionality is exposed. If the application requires login or a valid reset token for access, the attacker must first meet those conditions; however, the injection itself occurs after that check if the endpoint is vulnerable.

Refactor the password update logic to use parameterized queries or prepared statements everywhere and ensure that no user-controlled input is ever concatenated into SQL strings. Applying a consistent data access layer that enforces this pattern is often the most reliable fix.

Adopt a development standard that mandates parameterized queries, incorporate secure coding guidelines into code review, use frameworks or ORMs that handle binding by default, and run regular automated security testing to catch SQL injection patterns early in the development lifecycle.

Find out what's already
exploitable in your codebase.