Summary
Yonyou KSOA 9.0 contains a SQL injection vulnerability in the HTTP GET parameter handler of /worksheet/agent_worksdel.jsp, where the ID parameter is unsafely incorporated into database queries.
An attacker who can send crafted HTTP requests to this endpoint may manipulate backend SQL, potentially accessing, modifying, or deleting data in the underlying database.
Affected context
This vulnerability affects Yonyou KSOA 9.0 deployments that expose the /worksheet/agent_worksdel.jsp endpoint over HTTP or HTTPS.
It manifests when the application constructs SQL statements using the ID query parameter without robust server-side validation, input sanitization, or parameterized queries.
The risk increases in environments where the application account has broad database privileges or where the endpoint is reachable from untrusted networks.
Exploit preconditions
- Attack surface: Public or internal web interface at
/worksheet/agent_worksdel.jsp - Required access: Ability to send HTTP GET requests (typically unauthenticated or low-privilege, depending on deployment)
- Trigger point: Processing of the
IDquery parameter by the HTTP GET parameter handler within the JSP - Why exploitation is possible: The
IDvalue is incorporated directly into SQL statements without proper parameterization or filtering, allowing crafted input to alter query structure rather than being treated as data
Why this happens
The root cause aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection) and CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.
The application appears to build SQL queries dynamically by concatenating the ID parameter into query strings, trusting external input to be syntactically safe.
Because no strict parameterization, escaping, or whitelisting is enforced, attacker-controlled data influences the SQL command itself, causing the database to interpret parts of the input as executable SQL rather than inert data.
Potential impact
- Unauthorized reading of database records that the application account can access
- Modification or deletion of worksheet or related business data
- Creation or alteration of application accounts or permission records, depending on schema
- Bypassing of application-level authorization checks through direct data tampering
- In some configurations, execution of additional database-native functions that may aid further compromise
General mitigation guidance
Effective mitigation focuses on eliminating direct concatenation of user-controlled input in SQL and reducing trust in external parameters:
- Prefer parameterized queries or prepared statements for all database access, ensuring that the
IDparameter is always bound as data. - Apply strict server-side validation for identifier parameters (e.g., enforcing numeric or constrained formats) before they are used.
- Centralize data access logic so that query construction is standardized and follows secure patterns by default.
- Limit database privileges of the application account to the minimum required, reducing the blast radius if an injection occurs.
- Introduce input handling policies that treat all HTTP parameters as untrusted, with explicit validation and canonicalization before use in downstream components like databases.
How teams detect issues like this
Detection can combine code-centric and runtime approaches:
- Static analysis: Configure rules to flag dynamic SQL construction involving HTTP parameters, especially within JSPs and data access layers, and to detect string concatenation used to build queries.
- Code review: Examine
/worksheet/agent_worksdel.jspand related handlers for direct insertion of request parameters into SQL, absence of prepared statements, and missing validation onID. - Security testing: Use automated and manual application security testing tools that probe query parameters for injection behavior and verify whether responses or error messages indicate SQL manipulation.
- Runtime monitoring: Enable database query logging and anomaly detection to flag unusual query patterns, especially those containing user-supplied fragments or unexpected operators across web-exposed endpoints.
- Policy enforcement: Adopt secure coding guidelines requiring parameterized queries and input validation, enforced through CI checks and pre-merge security gates.

