Summary
Yonyou KSOA 9.0 contains an SQL injection vulnerability in the HTTP GET parameter handler for the folderid argument in /kmf/folder.jsp.
An attacker who can send crafted requests to this endpoint may manipulate database queries, potentially accessing, modifying, or deleting data on the backend system.
Affected context
The vulnerability occurs in Yonyou KSOA 9.0 within the web interface that processes HTTP GET requests to /kmf/folder.jsp.
It appears when user-controlled input from the folderid parameter is incorporated into backend SQL queries without robust validation or parameterization.
Any deployment that exposes this endpoint over a network and relies on dynamic query construction based on request parameters can be affected, particularly when database accounts used by the application hold broad privileges.
Exploit preconditions
- Attack surface: Network-accessible web endpoint at
/kmf/folder.jsp - Required access: Ability to send HTTP GET requests (typically unauthenticated or low-privileged web access, depending on configuration)
- Input vector: The
folderidquery parameter in the request URL - Trigger point: Server-side logic that builds SQL statements using
folderidwithout proper parameterization or escaping - Why exploitation is possible: The application treats the
folderidvalue as trusted and merges it into SQL queries in a way that allows attacker-controlled fragments to alter query structure, consistent with CWE-89 and the broader class of injection issues (CWE-74).
Why this happens
The root cause is unsafe construction of SQL queries using untrusted HTTP GET parameters.
Instead of binding folderid as a typed parameter in prepared statements, the application likely concatenates its value directly into a query string.
This pattern maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), and more generally CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.
When the application fails to strictly separate data from control tokens in the SQL layer, specially crafted input can break out of the intended data context and inject additional SQL operations.
Potential impact
- Unauthorized reading of database records, including potentially sensitive business or user data
- Modification or deletion of data, which can lead to data loss or integrity issues
- Bypassing of application-level authorization checks enforced at the data layer
- Enumeration of database schema and extraction of configuration or operational metadata
- In some environments, potential execution of database-specific functions that could aid in further system compromise
General mitigation guidance
Effective mitigation generally focuses on eliminating the ability for user input to change query structure and reducing the blast radius of any injection that might still occur.
Recommended defensive patterns include:
- Consistently using parameterized queries / prepared statements for all database access, ensuring that
folderidis always treated as a data parameter rather than concatenated into SQL. - Applying strict input validation for identifier-like parameters, such as allowing only numeric values or a well-defined pattern, and rejecting or sanitizing anything outside that pattern.
- Designing data access layers that centralize query construction so defensive measures (parameterization, validation) are enforced uniformly rather than scattered across JSPs or controllers.
- Applying the principle of least privilege to database accounts used by the application so they only have the minimum required operations (e.g., no unnecessary DDL or administrative rights).
- Implementing defense-in-depth controls such as application-level error handling that avoids leaking detailed SQL error messages back to clients.
How teams detect issues like this
Detection typically combines code-centric analysis with runtime monitoring:
- Static analysis: Configure SAST tools or custom rules to flag string-based SQL query construction where HTTP parameters (like
folderid) flow into query builders without parameter binding. - Code review: During manual reviews, look for JSPs or controllers that read request parameters and pass them directly into SQL statements, especially via string concatenation or format functions.
- Policy enforcement: Introduce development policies that require all new database interactions to use parameterized APIs, with automated checks in CI to block uses of unsafe patterns.
- Runtime monitoring: Use web application firewalls (WAFs) or database activity monitoring to detect anomalous query patterns, such as stacked queries or common SQL injection signatures in incoming requests.
- Log analysis: Review server and database logs for unexpected errors, unusual query structures, or spikes in requests targeting
/kmf/folder.jspwith suspiciousfolderidvalues.

