/

CVE-2025-70981

Severity:

CRITICAL RISK

(9.8)

SQL Injection in CordysCRM Employee List Interface

CVE-2025-70981

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Database Compromise / Potential Remote Code Execution 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

CordysCRM 1.4.1 contains a SQL Injection vulnerability in the employee list query interface (/user/list) via the departmentIds parameter.

An attacker who can send crafted requests to this endpoint may be able to manipulate database queries, potentially leading to data exfiltration, modification, or complete compromise of the underlying CRM database.

Affected context

The vulnerability exists in CordysCRM 1.4.1 within the HTTP endpoint that provides an employee list at /user/list.

It appears when the departmentIds parameter is used directly in SQL queries to filter or fetch employee data without robust input validation or parameterization.

Any deployment where this endpoint is reachable—such as internal CRM portals, internet-facing instances, or integrations calling this API—may be affected, depending on network exposure and authentication configuration.

Exploit preconditions

  • Attack surface: HTTP request to the /user/list endpoint of CordysCRM.
  • Required access: Ability to send requests to the CRM server (may be unauthenticated or low-privileged, depending on deployment configuration).
  • Trigger point: Supplying a maliciously crafted departmentIds parameter value in the request.
  • Why exploitation is possible: The parameter is concatenated or interpolated into an SQL query without proper use of prepared statements, strong input validation, or escaping, allowing the attacker-controlled value to alter the query structure.

Why this happens

This vulnerability is a classic instance of CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

The underlying issue is that user-controlled data from departmentIds is treated as trusted and directly integrated into an SQL query that determines how employee records are retrieved.

Instead of binding user input as data parameters, the implementation appears to construct dynamic SQL strings, giving attackers the ability to inject SQL syntax, change query logic, and potentially chain additional commands depending on the database engine and configuration.

Potential impact

  • Read access to sensitive CRM data, including employee records and related tables.
  • Unauthorized modification or deletion of database records.
  • Extraction of authentication data (such as password hashes or session information), depending on schema.
  • Privilege escalation within the application by altering access control or role-related data.
  • Potential execution of database-specific functions or commands that could lead to OS-level compromise, depending on the DBMS and configuration.

General mitigation guidance

Effective mitigation focuses on eliminating direct string-based SQL construction and tightening input handling for query parameters:

  • Use parameterized queries or prepared statements for all interactions involving departmentIds and similar inputs.
  • Implement strict server-side validation and normalization of identifier lists, ensuring only expected formats (e.g., numeric IDs, comma-separated lists) are accepted.
  • Apply least-privilege principles to the database account used by the application so that, even if injection occurs, the account has minimal capabilities.
  • Centralize data access patterns in a well-reviewed data access layer or ORM to reduce ad-hoc query building throughout the codebase.
  • Consider using allowlists for department identifiers or mapping external identifiers to internal safe keys where feasible.

How teams detect issues like this

Organizations can use multiple layers of detection to identify and manage SQL Injection risk:

  • Static analysis: Configure SAST tools or custom rules to flag string concatenation or interpolation used to build SQL queries, especially where HTTP parameters (like departmentIds) are involved.
  • Code review: During manual reviews, look for dynamic query construction patterns, missing parameter binding, and weak or absent input validation for filter parameters.
  • Dynamic testing: Employ DAST or security testing tools that probe API endpoints (such as /user/list) with typical SQL Injection payloads and monitor for error messages, anomalous responses, or timing differences.
  • Runtime monitoring: Use database and application logging (e.g., query logs, WAF logs) to detect suspicious query patterns, such as unexpected operators or keywords originating from user-supplied parameters.

Sources

SourceLink
github.comgithub.com/Tomikun2/SQL-Injection-in-CordysCRM/blob/main/README.md

Frequently asked

questions

Yes. If the CordysCRM instance exposes the /user/list endpoint over a network (internally or externally), an attacker who can reach it can attempt exploitation by sending crafted HTTP requests.

It depends on deployment configuration. If /user/list is accessible without authentication, no credentials are necessary. If it is protected, any user or service that can legitimately call this endpoint could potentially abuse the vulnerability.

Refactor all affected queries to use parameterized statements or prepared queries, and enforce strict validation of departmentIds so that only properly formatted, expected identifiers are processed.

Adopt a development standard that forbids manual string concatenation for SQL, mandate use of an ORM or parameterized data access layer, integrate static analysis into CI pipelines, and require security-focused code reviews for any changes touching query logic or request parameter handling.

Find out what's already
exploitable in your codebase.