Summary
FineCMS versions 5.0.4 through 5.0.10 have a SQL injection vulnerability in the data2 API action. An unauthenticated attacker who can provide a valid auth hash may use crafted GET parameters to run arbitrary SELECT queries and retrieve database information.
Affected context
The issue occurs in FineCMS's list_tag handling in libraries/Template.php, through the data2 API action. It affects versions 5.0.4 before 5.0.11 when the endpoint is reachable and a request supplies a valid auth hash alongside the SQL action parameters.
Exploit preconditions
- Attack surface: The
index.php?c=api&m=data2endpoint must be reachable over HTTP. - Required access: Authentication is not required, but the request must include a valid auth hash.
- Trigger point: The
list_taghandler processes GET parameters for thedata2action. - Why exploitation is possible: SQL input is handled in a way that allows attacker-controlled values to affect a SELECT query.
Why this happens
The application fails to adequately separate SQL instructions from untrusted request data in the data2 action. When attacker-controlled input is incorporated into a query rather than safely bound as data, the database may interpret it as SQL syntax. This is an SQL injection weakness described by CWE-89.
Potential impact
- Attackers may retrieve sensitive information stored in the database.
- Exposed records may include data that could support further attacks.
- Repeated or targeted queries could increase the scope of information disclosure.
General mitigation guidance
Common defensive patterns include:
- Use parameterized queries or prepared statements so request values are treated as data.
- Apply strict allowlists and validation to values that determine query behavior.
- Avoid exposing general-purpose query functionality through public endpoints.
- Restrict database accounts to the minimum privileges required by the application.
- Reduce exposure of sensitive database information and monitor access to API endpoints.
How teams detect issues like this
- Use static analysis to identify SQL statements built through string concatenation or interpolation with request data.
- Review API handlers for direct use of GET parameters in database queries.
- Enforce code-review and CI policies requiring parameterized database access.
- Monitor endpoint and database logs for unusual query patterns or unexpected data access.

