Summary
A SQL injection vulnerability in the Seeyon Zhiyuan OA Web Application System allows crafted input in the unitCode parameter of /assetsGroupReport/assetsService.jsp to be interpreted as part of a database query.
When user-supplied data is concatenated into SQL statements without proper validation or parameterization, remote attackers can manipulate queries, potentially accessing or modifying backend data.
Affected context
The issue appears in the Seeyon Zhiyuan OA Web Application System when HTTP requests to /assetsGroupReport/assetsService.jsp pass the unitCode parameter into database queries without sufficient sanitization or binding.
It typically arises in deployments where the application server can reach a relational database and where the affected endpoint is accessible over the network, such as in intranet or internet-facing OA installations.
Exploit preconditions
- Attack surface: HTTP interface of the Seeyon Zhiyuan OA Web Application System
- Endpoint:
/assetsGroupReport/assetsService.jsp(or equivalent mapped resource) - Input vector:
unitCoderequest parameter (likely query string or form field) - Required access: Network access to the web application (authentication requirements depend on deployment configuration)
- Trigger point: Execution of SQL queries that directly embed
unitCodewithout proper parameterization or escaping - Why exploitation is possible: User-controlled data is incorporated into SQL statements as raw text, enabling attackers to alter query structure and logic.
Why this happens
This vulnerability stems from building SQL statements by concatenating or interpolating user input directly into query strings instead of using parameterized queries or safe query builders.
According to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, the failure to correctly neutralize special characters (such as quotes, delimiters, and operators) allows the unitCode parameter to break out of its intended data context and inject additional SQL syntax.
The involvement of CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component highlights that untrusted data is forwarded to the database (a downstream interpreter) without adequate sanitization, turning benign input fields into a control channel for the SQL engine.
Potential impact
- Attackers may extract sensitive records from the underlying database.
- Data in application tables could be modified, corrupted, or deleted.
- Application-level authentication or authorization checks may be bypassed if queries control access logic.
- Additional SQL statements could be executed, potentially affecting other schemas or databases accessible by the same account.
- Under certain configurations, database-level features (e.g., stored procedures, OS interaction) could be abused to escalate impact.
General mitigation guidance
Effective mitigation revolves around preventing user input from altering SQL structure and tightening database privileges:
- Prefer parameterized queries (prepared statements) or ORM query builders that separate SQL code from data values.
- Apply strict server-side validation and canonicalization for parameters like
unitCode, allowing only expected formats (for example, fixed patterns or whitelisted identifiers). - Centralize SQL construction patterns to avoid ad-hoc string concatenation across the codebase.
- Enforce least-privilege database accounts so that even if a query is manipulated, the reachable operations and tables are limited.
- Consider implementing input encoding or escaping at the database driver layer where parameterization is not available, while recognizing this as a secondary measure.
- Use defense-in-depth controls such as application-level access checks that do not rely solely on SQL filtering.
How teams detect issues like this
Detection typically combines code-centric and runtime analysis:
- Static analysis: Configure SAST tools to flag dynamic SQL construction that includes user-controlled variables, especially within handlers for
/assetsGroupReport/assetsService.jsp. - Code review: Look for string concatenation in DAO or repository code related to
unitCode, and check for missing prepared statements and validation. - Runtime monitoring: Enable database auditing or query logging to detect anomalous statements containing comment markers, tautologies, UNION clauses, or stacked queries originating from the affected endpoint.
- Security testing: Incorporate automated and manual SQL injection testing into QA and CI pipelines, focusing on parameters that influence filtering or reporting data.

