Summary
Guardian language-system contains a critical SQL injection flaw where the id GET parameter is interpolated directly into a SQL query without sanitization.
An authenticated attacker can craft malicious id values to trigger error-based SQL injection and exfiltrate sensitive database contents under affected deployments.
Affected context
The vulnerability occurs in Guardian language-system within job_info_get.php when user-supplied id values from the $_GET array are embedded directly into a SQL statement.
It is relevant in deployments where the application connects to a backend relational database and relies on dynamic queries built from request parameters, especially when authentication gates access to job-related information but does not validate or constrain the id input.
Exploit preconditions
- Attack surface: HTTP(S) endpoint exposing
job_info_get.phpand acceptingidas a GET parameter. - Required access: Authenticated user account with permission to call the job information endpoint.
- Trigger point: Submission of a crafted
idparameter that alters the SQL syntax executed by the backend. - Why exploitation is possible: The application interpolates
$_GET['id']directly into the SQL query string (SELECT * FROM jobs where input1 = '".$_GET['id']."') without using parameterized queries or input validation, allowing attacker-controlled data to modify query structure (CWE-89).
Why this happens
The underlying bug is the use of string concatenation to build SQL statements from untrusted HTTP parameters in job_info_get.php.
Instead of treating id as data bound via a prepared statement, the application composes the query text directly, creating an injection channel where user input can break out of the intended literal context and influence the database interpreter.
This pattern maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where lack of neutralization or binding allows attackers to treat input as executable query logic.
Potential impact
- An attacker may extract sensitive data from the
jobstable and other accessible tables. - An attacker could enumerate database schema details (tables, columns, users) via error-based techniques.
- The vulnerability can allow modification or deletion of database records, impacting data integrity.
- Under certain configurations, attackers may be able to run database-specific administrative commands.
- If the database is tightly integrated with other systems, successful exploitation could lead to broader application compromise.
General mitigation guidance
Mitigation generally focuses on removing dynamic string concatenation from SQL construction and enforcing strict separation between data and query logic.
Robust patterns include:
- Using parameterized queries or prepared statements for all database interactions, binding user inputs as parameters instead of interpolating them into SQL text.
- Applying centralized input validation for identifiers and resource keys, constraining them to expected formats (such as numeric IDs or fixed-length tokens).
- Implementing least-privilege database accounts so that application credentials are limited to necessary operations and cannot perform high-risk administrative actions.
- Adopting secure-by-default data access layers or ORM frameworks that discourage ad-hoc SQL assembly and make prepared statements the default.
- Segregating sensitive tables and enforcing access control in application logic to reduce the impact if a query is abused.
How teams detect issues like this
Effective detection approaches often combine static analysis, code review, and policy enforcement:
- Configure static analysis rules to flag direct concatenation of
$_GET,$_POST, or other request data into SQL query strings. - During code review, look for inline SQL construction in scripts (like
job_info_get.php) where user input appears inside quotes or SQL keywords without binding. - Establish development policies that mandate prepared statements or ORM-based data access for all new database queries and treat deviations as security findings.
- Use automated security testing tools (SAST/DAST) capable of simulating malicious parameters to identify endpoints susceptible to SQL injection.
- Monitor database logs for unusual query patterns, such as queries containing tautologies, UNION selections, or attempts to access metadata tables.

