Summary
YouDataSum CPAS Audit Management System versions up to and including 4.9 contain a SQL injection vulnerability in the /cpasList/findArchiveReportByDah endpoint, where user-supplied input is incorporated into SQL queries without sufficient validation.
A remote, unauthenticated attacker can send crafted input to the vulnerable parameter to execute arbitrary SQL commands, which may result in unauthorized access to or manipulation of audit-related data.
Affected context
This vulnerability occurs in deployments of YouDataSum CPAS Audit Management System (≤ v4.9) that expose the /cpasList/findArchiveReportByDah endpoint over a network.
The risk is present when the application constructs database queries using request parameters from this endpoint without proper validation, sanitization, or parameterization.
Any environment where this endpoint is reachable by untrusted clients and backed by a production database containing audit or compliance records is potentially affected.
Exploit preconditions
- Attack surface: HTTP(S) endpoint /cpasList/findArchiveReportByDah exposed to users or the public internet.
- Required access: None; the issue is exploitable by unauthenticated remote users.
- Trigger point: Submission of crafted input to the vulnerable parameter in requests targeting the endpoint.
- Why exploitation is possible: The application concatenates or interpolates untrusted input directly into SQL statements without using safe parameter binding or robust server-side validation, allowing the attacker to alter the structure of the executed query.
Why this happens
The root cause aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
The affected code likely builds SQL queries by directly embedding request parameters from /cpasList/findArchiveReportByDah into query strings.
Without parameterized queries or comprehensive server-side validation, special characters and SQL control tokens in the input are not neutralized, allowing the input to change the intended semantics of the SQL command.
This pattern turns data into executable query logic, breaking the separation between code and data at the database layer.
Potential impact
- Unauthorized reading of audit and archival records that the attacker should not have access to.
- Modification, corruption, or deletion of records in the underlying database tables.
- Extraction of sensitive information stored in other tables reachable from the same database connection.
- Abuse of database-level privileges to create or modify accounts or application configuration data.
- Potential pivoting to broader system compromise if the database user has elevated privileges or if database functions are used to interact with the underlying operating system.
General mitigation guidance
Effective mitigation centers on preventing untrusted input from altering SQL structure and reducing the blast radius of any database interaction:
- Replace dynamic string-building of SQL with parameterized queries or prepared statements for all database access paths, especially in /cpasList/findArchiveReportByDah.
- Apply strict server-side validation and canonicalization on all request parameters, rejecting unexpected formats and disallowing control characters or SQL meta-characters where they are not semantically required.
- Introduce an allowlist approach for queryable fields and operations; avoid passing raw field names or clauses from user input.
- Enforce least-privilege on the database account used by the application so it only has the minimum permissions needed (e.g., no arbitrary DDL or admin capabilities).
- Centralize database access logic behind a well-reviewed data access layer, making it easier to enforce consistent parameterization and input handling patterns.
- Implement secure-by-default configurations where new endpoints automatically use safe ORM or query-building abstractions that discourage raw query concatenation.
How teams detect issues like this
Detection commonly combines code-level analysis with runtime monitoring:
- Use static analysis rules to flag construction of SQL strings that incorporate request parameters or other untrusted data without parameter binding.
- During code review, search for direct string concatenation or formatting functions used in SQL queries in controllers or services handling /cpasList/findArchiveReportByDah.
- Enforce development policies that require parameterized queries and document exceptions, supported by automated checks in CI pipelines.
- Monitor database logs for anomalous patterns such as unexpected comment tokens, UNION clauses, or tautological predicates originating from web requests.
- Employ web application firewalls (WAF) or API gateways configured with SQL injection signatures as an additional detection and alerting layer, while not relying on them as the primary defense.

