Summary
Yonyou KSOA 9.0 contains a SQL injection vulnerability in the HTTP GET parameter handler of /worksheet/agent_worksadd.jsp, where the ID parameter is not safely handled before being used in database queries.
A remote attacker can manipulate this parameter to influence backend SQL statements, potentially leading to data access, modification, or other database-level impacts when the crafted request is processed.
Affected context
The vulnerability occurs in web deployments of Yonyou KSOA 9.0 that expose the /worksheet/agent_worksadd.jsp endpoint over HTTP/HTTPS.
It is relevant where request parameters, especially ID, are incorporated into database operations without consistent parameterization or robust input handling.
The issue manifests at the application–database boundary, particularly in code paths that assemble SQL queries dynamically based on GET parameters.
Exploit preconditions
- Attack surface: Public or internal web interface at
/worksheet/agent_worksadd.jsp. - Required access: Ability to send crafted HTTP GET requests to the affected endpoint; no prior authentication may be required depending on deployment configuration.
- Trigger point: Processing of the
IDquery parameter by server-side logic that constructs and executes SQL statements. - Why exploitation is possible: User-controlled data from
IDis incorporated into SQL queries without reliable use of parameterized statements or adequate neutralization, allowing manipulation of the query structure itself.
Why this happens
The underlying issue aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') and is related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.
Application code likely constructs SQL statements by concatenating the ID parameter directly into query strings or by otherwise treating it as trusted input.
Because the database interprets certain characters and tokens as part of SQL syntax, an attacker can craft values for ID that alter the intended query, affecting conditions, returned rows, or additional operations executed by the database.
Potential impact
- May allow attackers to read sensitive data from database tables beyond what the application normally exposes.
- Could enable modification or deletion of records, impacting data integrity.
- Might permit creation of new accounts or escalation of privileges at the application level if authorization data is stored in the database.
- Can potentially lead to full database compromise if chained with additional weaknesses such as overly privileged database accounts.
- May facilitate application-level denial of service by issuing resource-intensive or destructive queries.
General mitigation guidance
Effective mitigation focuses on treating all incoming request parameters as untrusted and ensuring they cannot alter SQL structure:
- Prefer parameterized queries or prepared statements for all database access, binding user input as data rather than concatenating strings.
- Introduce strict input validation and normalization for parameters like
ID, using allowlists for expected formats (e.g., numeric identifiers or constrained patterns). - Centralize data access logic to enforce consistent query-building patterns and avoid ad-hoc SQL string assembly in JSPs or controllers.
- Apply least-privilege to database accounts used by the application so that even if a query is manipulated, the account cannot perform high-risk operations (e.g., DDL, cross-schema access).
- Consider using ORM frameworks or query builders that default to safe parameter binding where appropriate.
How teams detect issues like this
Detection generally combines code-focused and behavior-focused approaches:
- Static analysis: Use scanners or linters configured to flag dynamic SQL construction that incorporates HTTP parameters, particularly in JSPs and data access layers; look for string concatenation patterns involving
request.getParameter("ID")or equivalent. - Code review: During manual review, pay attention to all database interactions in request handlers, verifying that they use bound parameters and that all user-supplied inputs are validated before use.
- Dynamic testing: Employ web application security testing tools to probe endpoints like
/worksheet/agent_worksadd.jspfor SQL injection indicators (e.g., differential responses, error messages, or timing discrepancies when special payloads are used). - Runtime monitoring: Enable database and application logging for unusual query patterns, failed queries with syntax errors, or anomalous spikes in similar query templates, and feed these into monitoring/alerting systems.

