Severity:

HIGH RISK

(7.2)

SQL Injection in SSCMS stl:sqlContent Tag

CVE-2026-7435

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Execution Leading to Database Compromise

Severity:

HIGH RISK

(7.2)

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

SSCMS v7.4.0 contains a SQL injection flaw in the stl:sqlContent tag where the queryString attribute is sent directly to the database without parameterization or sanitization.

By sending crafted (encrypted) payloads to the /api/stl/actions/dynamic endpoint, an attacker can execute arbitrary SQL, which may result in unauthorized access, data disclosure, authentication bypass, or full database compromise.

Affected context

The vulnerability appears in SSCMS deployments that:

  • Use the stl:sqlContent tag to dynamically run SQL based on the queryString attribute
  • Expose the /api/stl/actions/dynamic endpoint for dynamic content rendering or actions
  • Accept user-controlled or indirectly controllable values that flow into queryString
  • Execute database commands without consistent use of prepared statements or robust input validation

Risk is higher where this endpoint is reachable from untrusted networks or integrated with user-driven content.

Exploit preconditions

  • Attack surface: HTTP(S) interface via the /api/stl/actions/dynamic endpoint
  • Required access: Ability to send requests to this API (may be authenticated or unauthenticated, depending on deployment configuration)
  • Input control: Capability to influence or construct the encrypted payload such that it controls the queryString value for stl:sqlContent
  • Trigger point: Execution of the stl:sqlContent tag which passes queryString directly to the database execution layer
  • Why exploitation is possible: The SQL statement is built using untrusted data without parameterization, escaping, or robust server-side validation, enabling an attacker to alter query structure and logic.

Why this happens

The root cause is unsafe construction and execution of SQL statements that embed untrusted input from the queryString attribute.

Instead of using parameterized queries or prepared statements, the application constructs raw SQL text and sends it directly to the database engine.

This pattern is a classic instance of CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where user-controlled data is treated as part of the SQL command itself, allowing it to modify query behavior.

Potential impact

  • Unauthorized reading of sensitive data from application tables
  • Modification or deletion of records, including content or configuration data
  • Authentication bypass by altering login or session-related queries
  • Creation of new administrative accounts or escalation of existing privileges at the application level
  • Disruption of service through destructive operations such as dropping tables or locking critical resources
  • Potential pivot to underlying host or other systems if database functions (e.g., file or network APIs) are enabled and abused

General mitigation guidance

Effective mitigation focuses on eliminating direct string-based SQL construction and reducing trust in any client-controlled input:

  • Refactor dynamic SQL usage to rely on parameterized queries or prepared statements, ensuring that data values cannot alter query structure
  • Introduce a server-side query builder or abstraction layer for stl:sqlContent that only allows whitelisted operations and fields instead of free-form SQL text
  • Enforce strict input validation and canonicalization on parameters that influence SQL, limiting them to expected formats, ranges, and known-safe values
  • Apply least-privilege database accounts, restricting what the application's database user can read or modify, so that injected queries are constrained
  • Consider disabling or limiting dynamic SQL tags in contexts exposed to untrusted users, or gating them behind additional authorization and review
  • Centralize SQL execution patterns so that secure defaults (parameterization, escaping, validation) are consistently applied.

How teams detect issues like this

Detection typically combines code-centric and behavior-centric approaches:

  • Static analysis: Use rules or tools that flag string concatenation or interpolation used to build SQL queries, especially where values originate from HTTP requests or template attributes like queryString
  • Code review: Look for dynamic SQL tags such as stl:sqlContent and verify that all their inputs are parameterized and validated; pay attention to ad-hoc SQL execution helpers
  • Logging and monitoring: Monitor database logs and application logs for anomalous query patterns (e.g., presence of comment markers, UNION clauses, or unexpected conditions) originating from the dynamic endpoint
  • WAF/RAAS policies: Deploy web application firewall rules to detect and block common SQL injection patterns, while recognizing that obfuscation or encryption layers may require deeper inspection
  • Security tests: Regularly run automated and manual penetration tests focused on dynamic query endpoints to validate that injection attempts are rejected or safely handled.

Sources

SourceLink
github.comgithub.com/siteserver/cms
github.comgithub.com/siteserver/cms/issues/3891
vulncheck.comvulncheck.com/advisories/sscms-sql-injection-via-stl-sqlcontent-querystring

Frequently asked

questions

Exploitability depends on whether the /api/stl/actions/dynamic endpoint is reachable from untrusted clients and whether attackers can craft or influence the encrypted payloads feeding the queryString. In environments where this endpoint is publicly accessible, the risk is significantly higher.

Not necessarily. If the endpoint is exposed without strong authentication or if lower-privileged users can trigger dynamic SQL content with controllable parameters, an attacker can leverage that access. If access is tightly restricted and authenticated, exploitability may be reduced but not entirely eliminated.

The safest pattern is to eliminate direct string-based SQL construction from stl:sqlContent and similar mechanisms, using parameterized queries or a constrained query abstraction. Dynamic behavior should be achieved through whitelisted operations and parameters rather than raw SQL input.

Adopt a standard data-access layer that enforces parameterization by default, mandate strict server-side validation for all inputs that influence SQL, and include secure coding guidelines plus automated checks for SQL construction in your development lifecycle. Regular security reviews of templating or tag-based dynamic features help catch unsafe patterns early.

Find out what's already
exploitable in your codebase.