Summary
Yonyou KSOA 9.0 contains a SQL injection vulnerability in the HTTP GET parameter handling of /worksheet/work_mod.jsp, where the ID parameter is used unsafely in database queries.
A remote attacker can manipulate this parameter to inject arbitrary SQL, potentially accessing, modifying, or deleting backend data when the vulnerable endpoint is reachable over the network.
Affected context
The vulnerability appears in the web layer of Yonyou KSOA 9.0 within the /worksheet/work_mod.jsp endpoint, specifically in how it processes the ID HTTP GET parameter before building SQL queries.
It is relevant in deployments where:
- The KSOA web interface is exposed to users or the internet.
- The ID parameter is passed from the HTTP request directly or indirectly into SQL statements.
- Database accounts used by the application have broad or default privileges rather than least privilege.
Exploit preconditions
- Attack surface: Remote HTTP access to the /worksheet/work_mod.jsp endpoint.
- Required access: Ability to send crafted GET requests (no prior authentication is mentioned, though actual access control depends on deployment).
- Trigger point: The server-side code reads the ID parameter and incorporates it into an SQL statement.
- Why exploitation is possible: The ID parameter is not properly validated, sanitized, or bound as a parameterized value, allowing user-controlled input to alter the intended structure of SQL queries executed by the database.
Why this happens
This issue stems from dynamically constructing SQL queries using untrusted input from the ID GET parameter without robust input handling or parameterization.
Instead of using prepared statements or strict query builders, the application likely concatenates request parameters into SQL strings, allowing attacker-controlled characters (such as quotes or SQL operators) to change the semantics of the query.
Conceptually, this maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), and is also related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, because database queries are a downstream consumer of the untrusted data.
Potential impact
- Attackers may extract sensitive business data from the database.
- Data within affected tables can be modified, corrupted, or deleted.
- Authentication or authorization checks backed by the database can be bypassed in some configurations.
- Additional application functionality could be abused by injecting UNION queries or subqueries.
- In some environments, extended database features (e.g., stored procedures, shell-out functions) could potentially lead to server-side code execution.
General mitigation guidance
Effective mitigation focuses on eliminating the ability for user input to alter SQL structure:
- Use parameterized queries (prepared statements) or ORM query builders for all database operations that incorporate request parameters such as ID.
- Apply strict input validation and type enforcement (e.g., numeric-only for ID fields) at both the server-side controller and data access layers.
- Centralize query construction logic and prohibit ad hoc string concatenation for SQL, especially in JSPs or presentation code.
- Enforce least-privilege database accounts so that even if a query is manipulated, available actions are constrained.
- Introduce a secure coding guideline and review process that disallows direct concatenation of HTTP parameters into SQL queries.
How teams detect issues like this
Detection typically combines code-centric and behavior-centric approaches:
- Static application security testing (SAST) rules that flag string concatenation in SQL calls and direct use of request parameters (e.g., request.getParameter("ID")) inside query construction.
- Manual code review focusing on JSPs and controller code that passes user input to DAO or JDBC layers without clear parameter binding.
- Database activity monitoring to detect anomalous query patterns such as unexpected UNION, subselects, or tautological WHERE clauses originating from the web application.
- Web application firewall (WAF) rules or runtime protections that look for common SQL injection payload patterns in the ID parameter for /worksheet/work_mod.jsp.

