Summary
A SQL injection vulnerability in YzmCMS 7.5 allows an authenticated administrator to influence a database query through the parentid parameter used by the category management controller. Under deployments where an administrator account can reach the vulnerable function, boolean-based blind injection may enable unauthorized database access or manipulation.
Affected context
The issue occurs in the administrative category-management functionality of YzmCMS 7.5, specifically in the get_arrchildid() function. Risk is present when the function receives the parentid parameter from an authenticated request and incorporates it into a FIND_IN_SET() SQL expression without adequate parameterization or validation.
Exploit preconditions
- Attack surface: YzmCMS administrative category-management endpoint
- Required access: A valid authenticated administrator account or equivalent access to the affected function
- Trigger point: Processing of the user-controlled
parentidparameter byget_arrchildid() - Why exploitation is possible: The parameter is concatenated into a SQL clause, allowing query logic to be influenced rather than treated strictly as data
Why this happens
The underlying bug is the construction of a database query by concatenating user-controlled input into a FIND_IN_SET() expression. Without parameterized queries, rigorous input handling, and context-appropriate validation, database syntax can be interpreted as part of the command. This behavior maps to CWE-89, SQL Injection, because untrusted input changes the intended structure or behavior of a SQL statement.
Potential impact
- An attacker may retrieve sensitive database contents through blind query inference.
- An attacker could modify or delete application data.
- Database credentials, user records, and configuration data may be exposed.
- The application could experience unauthorized administrative or business-state changes.
- Compromise of database-connected services could enable further intrusion.
General mitigation guidance
Mitigation generally focuses on ensuring that all database queries treat
external input as data rather than executable SQL.
Common defensive patterns include:
- Use parameterized queries or prepared statements for the FIND_IN_SET() operation.
- Apply strict allowlist validation to identifiers and expected numeric values.
- Keep database accounts limited to the privileges required by the application.
- Separate administrative database capabilities from broader operational accounts.
- Centralize query construction and security review for database-facing code.
- Avoid exposing database errors or query behavior through administrative responses.
- Apply defense-in-depth controls such as database activity monitoring and network restrictions.
How teams detect issues like this
Organizations can identify similar issues through:
- Static analysis rules that flag string concatenation or interpolation in SQL queries.
- Code review checks for database calls receiving request parameters without binding.
- Tests that verify unexpected input is handled as a value and cannot alter query behavior.
- Monitoring for unusual administrative query patterns, repeated conditional requests, or abnormal database access.
- Policy enforcement requiring prepared statements and approved database-access abstractions.
- Neutral automated code-review or software-composition tools that identify common injection patterns.

