/

CVE-2026-75334

Severity:

CRITICAL RISK

(9.8)

SQL Injection (CWE-89) in smart-web2 Backend Reports

CVE-2026-75334

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Execution and Database Compromise

Severity:

CRITICAL RISK

(9.8)

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

A critical SQL injection vulnerability in the smart-web2 report module allows attacker-controlled report SQL resources to be embedded directly into Hibernate native queries. If an attacker can submit or alter the sqlResource.sql value through the report-saving interface, they may execute unauthorized database statements with the application's database privileges.

Affected context

The vulnerability occurs in the backend report module when the sqlResource.sql parameter submitted through the ReportController.save() interface is persisted in the t_report_sql_resource table and later included in Hibernate native queries. Risk depends on whether the interface is reachable by an attacker and whether submitted report definitions are trusted, validated, or restricted by authorization controls.

Exploit preconditions

  • Attack surface: The backend report-saving interface and subsequent report query execution
  • Required access: Ability to submit, modify, or influence a report's sqlResource.sql value; the exact access level depends on deployment authorization
  • Trigger point: Processing a saved report that causes the stored SQL resource to be used in a native database query
  • Why exploitation is possible: The value is embedded into a native query without parameterization or effective filtering, allowing SQL syntax supplied through the report resource to alter query behavior

Why this happens

The underlying bug is the construction of Hibernate native queries by concatenating or directly embedding a value that can originate from an externally controlled report resource. Because the application does not separate SQL code from data through parameter binding or an equivalent constrained query model, attacker-controlled content can change the intended statement structure. This behavior maps to CWE-89, Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

Potential impact

  • An attacker may read unauthorized database records.
  • An attacker could modify or delete application data.
  • The vulnerability may expose credentials, tokens, personal information, or business records stored in accessible tables.
  • An attacker may bypass application-level data restrictions enforced only outside the database query.
  • Database availability could be affected through resource-intensive or destructive statements.
  • Further compromise could occur if the database account has excessive privileges or database-specific operating features are enabled.

General mitigation guidance

Mitigation generally focuses on keeping SQL code separate from user-controlled

or configuration-controlled data.

Common defensive patterns include:

  • Use parameterized queries, bind variables, or safe query-builder abstractions for all runtime values.
  • Avoid treating stored report definitions as trusted SQL; prefer a constrained report language or allowlisted query templates.
  • Apply strict server-side validation and authorization to report creation, modification, and execution.
  • Limit report users to the smallest set of query operations and data scopes required.
  • Run the application with a dedicated database account that has only necessary privileges.
  • Avoid exposing database administrative capabilities through the application account.
  • Apply output filtering, auditing, and controlled error handling to reduce data leakage.

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis for string concatenation, interpolation, or formatting of request or database-derived values into native SQL.
  • Code review signals such as direct use of report fields in query text, dynamic SQL fragments, and missing parameter binding.
  • Tests that submit unexpected SQL metacharacters and verify that values remain data rather than changing query structure.
  • Runtime database monitoring for unusual statements, privilege use, access to unrelated tables, and anomalous query volume.
  • Policy enforcement requiring approved parameterized query APIs or constrained query builders.
  • Neutral automated security and code-review tools can help detect unsafe query construction, but findings should be validated against application authorization and data-flow behavior.

Sources

SourceLink
github.comgithub.com/fangtang7/CVE/blob/main/smart-web2/smart-web2%20v1.3.1%20SQL%20Injection.md

Frequently asked

questions

It may be remotely exploitable when the report-saving or report-execution

interfaces are network-accessible and an attacker can reach them with

sufficient authorization. Exploitability depends on deployment exposure and

access controls.

The attacker must be able to influence the sqlResource.sql value or a

persisted report resource that is later executed. This may require an

authenticated account if report management is protected.

Use parameterized queries or a constrained, allowlisted report-query model.

Do not concatenate report-controlled content into native SQL, and enforce

authorization separately from query construction.

Establish secure database-query standards, review all dynamic SQL paths,

restrict database-account privileges, test report features for injection

behavior, and monitor database activity for anomalous access.

Find out what's already
exploitable in your codebase.