/

CVE-2020-37051

Severity:

HIGH RISK

(8.2)

SQL Injection in Online-Exam-System Feedback Form

CVE-2020-37051

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Credential and Sensitive Data Extraction via Blind SQL Injection

Severity:

HIGH RISK

(8.2)

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

Online-Exam-System 2015 contains a time-based blind SQL injection flaw in its feedback form, allowing crafted input to manipulate backend SQL queries.

When exploited via the feed.php endpoint, an attacker can use timing-based responses to systematically extract database password hashes without directly seeing query results.

Affected context

This vulnerability appears in the Online-Exam-System 2015 web application within the feedback submission workflow handled by feed.php.

It manifests when user-supplied feedback data is incorporated into SQL queries without proper input validation, parameterization, or output-neutralization.

Environments where the application is internet-facing or reachable by untrusted users, and where the database stores password hashes or other sensitive data, are at particular risk.

Exploit preconditions

  • Attack surface: HTTP requests sent to the feed.php endpoint (feedback form).
  • Required access: Network access to the web application; no special privileges are typically required beyond the ability to submit feedback.
  • Trigger point: Submission of specially crafted feedback parameters that alter the structure of underlying SQL queries and introduce conditional time delays.
  • Why exploitation is possible: The feedback parameter is concatenated directly into SQL statements, enabling attackers to inject conditional expressions that cause measurable response-time differences, which can be used to infer sensitive data character by character.

Why this happens

The core issue is the construction of SQL queries by directly embedding untrusted input from the feedback form into query strings.

Without parameterized queries or rigorous input handling, the application treats user-controlled data as executable SQL, making it possible to append conditional logic such as deliberate delays.

This aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where unsafe concatenation enables attackers to manipulate query semantics and observe side-channel behavior (response times) even when results are not directly visible.

Potential impact

  • Attackers may extract database password hashes for application users and administrators.
  • Credential hashes could be reused or cracked offline, potentially leading to account takeover.
  • Sensitive database content (e.g., exam data, student records) could be inferred through extended enumeration.
  • The integrity of exam results and user data may be compromised via further SQL manipulation.
  • Database availability could be degraded through repeated heavy time-delay queries.

General mitigation guidance

Mitigation generally focuses on eliminating direct SQL injection vectors and enforcing strict separation between data and code in database operations.

Recommended patterns include:

  • Use parameterized queries or prepared statements for all database interactions, especially those incorporating feedback or other free-form text.
  • Centralize database access through a data-access layer that rejects dynamic string-based query construction.
  • Apply server-side validation and normalization of input, especially for fields that are expected to contain only constrained character sets or lengths.
  • Implement least-privilege database accounts so the application can only perform the minimal required operations and cannot read unnecessary sensitive tables.
  • Employ generic error handling and avoid timing behavior that reveals internal query logic; where practical, enforce query timeouts and rate limiting on expensive operations.

How teams detect issues like this

Detection typically combines code-level review with behavioral monitoring:

  • Static analysis: Configure rules to flag dynamic SQL construction, string concatenation in query builders, and unparameterized statements, particularly in request-handling code such as feed.php.
  • Code review: Examine all endpoints that accept text input (feedback, comments, forms) for proper use of prepared statements and absence of inline SQL fragments using user data.
  • Dynamic testing: Use web application scanning and fuzzing tools configured for blind SQL injection detection, focusing on time-based payloads against form parameters.
  • Runtime monitoring: Log and monitor for anomalous query patterns such as repeated similar queries with varying literals and consistent long execution times, along with unusual spikes in feedback submissions.

Sources

SourceLink
github.comgithub.com/sunnygkp10/Online-Exam-System-.git
exploit-db.comexploit-db.com/exploits/48560
vulncheck.comvulncheck.com/advisories/online-exam-system-feedback-sql-injection

Frequently asked

questions

Yes. An attacker with network access to the Online-Exam-System web interface can remotely submit crafted feedback requests to feed.php to exploit the blind SQL injection.

In many deployments, feedback forms are accessible to unauthenticated users, so exploitation may not require any prior authentication. However, the exact requirement depends on how access to the feedback functionality is configured.

The most robust fix is to replace all dynamically constructed SQL in the feedback handling code with parameterized queries or prepared statements, ensuring user input is bound as data only, not as part of the SQL command. This should be applied consistently across the whole application, not just feed.php.

Standardize on safe database access patterns (ORMs or parameterized query APIs), enforce secure coding guidelines through code review and automated static analysis, validate and normalize user input, and incorporate regular security testing (including SQL injection tests) into the development and deployment pipeline.

Find out what's already
exploitable in your codebase.