/

CVE-2021-47980

Severity:

HIGH RISK

(7.1)

SQL Injection in Fuel CMS Activity Log 'col' Parameter

CVE-2021-47980

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Confidentiality and integrity compromise of the application database via authenticated blind SQL injection

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Fuel CMS 1.4.13 contains a blind SQL injection vulnerability in the Activity Log interface, where the col parameter is directly incorporated into database queries without proper sanitization.

An authenticated attacker can inject SQL code via this parameter, abusing time-based responses to infer and extract sensitive database information without directly seeing query results.

Affected context

The vulnerability occurs in Fuel CMS 1.4.13 within the admin Activity Log feature, specifically when the logs endpoint processes the col parameter.

It manifests in deployments where:

  • Authenticated users can access the Activity Log interface or its backing endpoint
  • The col parameter is passed from HTTP requests directly into SQL query construction
  • Input validation or parameterization is missing or incomplete for this parameter

Under these conditions, crafted col values can influence the structure of the underlying SQL query.

Exploit preconditions

  • Attack surface: HTTP requests to the Fuel CMS Activity Log logs endpoint (typically via the admin interface or its APIs).
  • Required access: Valid authenticated session with sufficient privileges to reach the Activity Log functionality.
  • Trigger point: Submission of a request where the col parameter contains specially crafted SQL fragments.
  • Why exploitation is possible: The application dynamically builds SQL queries using attacker-controlled col input, without enforcing strict whitelisting of allowed column names or using parameter binding for that portion of the query. This allows the attacker to alter query logic and use time-based delays to derive data from the database.

Why this happens

This issue is rooted in constructing SQL statements by concatenating untrusted user input into query strings, rather than using safe query-building APIs.

In the Activity Log implementation, the col parameter appears to be treated as a column selector or sorting field, but its value is not constrained to a fixed, known set of column names. Because this value is interpolated into the SQL text itself, an attacker can inject additional SQL operators, conditions, or functions.

This aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where special characters and control tokens in user input are not neutralized or structurally separated from the SQL command. The "blind" aspect arises because results are not directly echoed to the attacker, so timing behavior or other side channels must be used to infer data.

Potential impact

  • Extraction of sensitive database contents (user accounts, configuration data, or other tables) via time-based blind inference.
  • Enumeration of database schema, including table names and column structures.
  • Manipulation of query logic to bypass intended logging, filtering, or monitoring in the Activity Log.
  • Potential modification or deletion of database records, depending on database permissions of the application account.
  • Pivoting to further application compromise if configuration secrets, session data, or password hashes are exposed.

General mitigation guidance

Effective mitigation focuses on preventing untrusted data from influencing SQL structure and strictly controlling dynamic query elements:

  • Replace ad hoc string-based SQL construction with parameterized queries or prepared statements for all user-supplied values.
  • Where dynamic selection of columns or sort fields is needed, enforce strict whitelisting: map user-facing options to a fixed set of allowed column identifiers, and ignore or reject any unexpected value.
  • Centralize query-building logic so that security checks (validation, escaping, and parameter binding) are consistently applied.
  • Apply server-side validation that treats request parameters as untrusted, rejecting inputs that do not conform to expected formats (e.g., known identifiers, constrained character sets).
  • Use the database account with the least privileges required for the Activity Log feature, limiting the damage if injection occurs.
  • Adopt a secure coding guideline for data access layers, discouraging direct concatenation of request parameters into SQL strings.

How teams detect issues like this

Detection can leverage both code-centric and behavior-centric techniques:

  • Static analysis: Configure SAST tools or linters to flag string concatenation or interpolation into SQL query builders, especially involving request parameters such as col. Rules can focus on data flows from HTTP input to database APIs.
  • Code review: During manual reviews, look for:
  • Dynamic SQL built from parameters without whitelisting.
  • Any place where column names, sort directions, or table names come directly from user input.
  • Data access code in admin features that might be assumed safe because they are "authenticated".
  • Runtime monitoring: Use application-level logging and database monitoring to detect anomalous query patterns, such as unexpected use of boolean logic, time-delay functions, or unusually long-running queries tied to the Activity Log endpoint.
  • Security testing: Incorporate automated DAST and manual penetration testing that probe parameters like col with typical SQL injection payloads and timing-based checks.

Sources

SourceLink
github.comgithub.com/daylightstudio/FUEL-CMS/archive/1.4.13.zip
exploit-db.comexploit-db.com/exploits/50523
getfuelcms.comgetfuelcms.com/
vulncheck.comvulncheck.com/advisories/fuel-cms-blind-sql-injection-via-col-parameter

Frequently asked

questions

Yes, if the Fuel CMS admin interface or Activity Log endpoint is reachable over the network and an attacker can obtain valid credentials, they can exploit the blind SQL injection remotely through crafted HTTP requests.

The attacker must at least be authenticated and able to access the Activity Log feature or its underlying endpoint. The exact role requirements depend on how the site is configured, but it is not exploitable by fully unauthenticated users in typical setups.

The most robust fix is to remove all direct string concatenation of request parameters into SQL, use parameterized queries for values, and strictly whitelist any dynamic identifiers such as column names. Implementing a mapping from allowed UI options to hard-coded column names is a common safe pattern.

Adopt a secure data access layer that enforces parameterized queries by default, define coding standards that forbid raw SQL construction with user input, and integrate static analysis and security reviews into the development lifecycle, with special attention to admin and logging features that may be incorrectly assumed to be low risk.

Find out what's already
exploitable in your codebase.