Summary
Yonyou KSOA 9.0 contains a SQL injection flaw in the /kmf/save_folder.jsp endpoint, where the HTTP GET parameter folderid is incorporated into database queries without adequate sanitization or parameterization.
A remote attacker who can send crafted requests to this endpoint may manipulate backend SQL queries, potentially accessing, modifying, or destroying application data depending on database privileges.
Affected context
The vulnerability occurs in Yonyou KSOA 9.0 within the /kmf/save_folder.jsp functionality that processes HTTP GET parameters.
It appears when user-controlled input from the folderid parameter is passed into SQL statements without sufficient validation, encoding, or use of bound parameters.
Systems are most at risk when this endpoint is accessible from untrusted networks and the application uses a highly privileged database account.
Exploit preconditions
- Attack surface: Public or internal web interface exposing /kmf/save_folder.jsp over HTTP/HTTPS
- Required access: Ability to issue HTTP GET requests to the vulnerable endpoint (typically unauthenticated or with low-privilege access, depending on deployment)
- Trigger point: Supplying crafted SQL fragments through the folderid parameter in the query string
- Why exploitation is possible: The server-side logic interpolates folderid directly into SQL queries (or passes it unsafely to a query builder) without parameterization or robust input handling, allowing control over the resulting SQL executed by the database
Why this happens
This issue stems from building SQL queries using string concatenation with untrusted input from the folderid GET parameter.
Instead of using prepared statements or parameterized queries, the application likely embeds the parameter value directly into the SQL statement, causing the database to interpret attacker-supplied content as part of the query logic.
This maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), and more generally to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, where untrusted data is sent to a backend system without correct neutralization.
Potential impact
- Unauthorized reading of database records, including potentially sensitive business or personal data
- Modification or deletion of application data, leading to integrity loss or operational disruption
- Creation of new accounts or escalation of application-level privileges if user or role tables are exposed
- Extraction of database metadata, such as table structures and schema information
- In some environments, potential execution of database-specific functions that could aid further compromise
General mitigation guidance
Effective mitigation centers on eliminating direct string-based query construction and reducing trust in user-supplied parameters:
- Prefer parameterized queries or prepared statements for all database interactions involving user input, including the folderid parameter.
- Apply strict server-side validation on folderid (e.g., enforcing numeric or well-defined identifier formats) before it reaches persistence layers.
- Use centralized data access layers or ORM frameworks configured to avoid raw SQL concatenation by default.
- Limit database account privileges so the application can access only the minimal set of tables and operations required.
- Adopt a secure coding standard that forbids inline SQL with unsanitized input and encourages safe query-building patterns.
How teams detect issues like this
Detection generally involves a combination of code, configuration, and runtime analysis:
- Static analysis: Configure SAST tools or custom rules to flag string concatenation or unescaped interpolation involving SQL keywords and user input (particularly in JSPs and data access classes).
- Code review: Examine handlers for HTTP parameters like folderid in /kmf/save_folder.jsp and trace their flow into database APIs; look for dynamic SQL assembly and missing parameter binding.
- Logging and monitoring: Enable detailed database and application logs to identify anomalous query patterns (e.g., unexpected OR 1=1 logic, tautologies, or injected fragments).
- Security testing: Use automated vulnerability scanners or manual penetration testing to probe inputs to SQL-backed endpoints and verify that queries cannot be influenced by crafted payloads.

