/

CVE-2025-45871

Severity:

HIGH RISK

(8.1)

SQL Injection (CWE-89) in LogicalDOC Workflows Servlet

CVE-2025-45871

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Database query manipulation and potential data access

Severity:

HIGH RISK

(8.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

A blind SQL injection vulnerability in LogicalDOC Enterprise allows an authenticated user to influence database queries through a crafted workflow template name. Under deployments where workflow input reaches database queries without safe parameterization, an attacker may infer or alter database-accessed information.

A blind SQL injection vulnerability in LogicalDOC Enterprise allows an authenticated user to influence database queries through a crafted workflow template name. Under deployments where workflow input reaches database queries without safe parameterization, an attacker may infer or alter database-accessed information.

Affected context

The vulnerability occurs in the WorkflowsDataServlet component of LogicalDOC Enterprise when workflow template names are processed as part of database queries. Risk depends on the application accepting attacker-controlled workflow data and constructing SQL statements without consistently separating input values from query logic.

The vulnerability occurs in the WorkflowsDataServlet component of LogicalDOC Enterprise when workflow template names are processed as part of database queries. Risk depends on the application accepting attacker-controlled workflow data and constructing SQL statements without consistently separating input values from query logic.

Exploit preconditions

  • Attack surface: The workflow management functionality exposed through the WorkflowsDataServlet
  • Required access: An authenticated LogicalDOC user account with access to create or modify workflow templates
  • Trigger point: Processing a crafted workflow template name
  • Why exploitation is possible: User-controlled input may be incorporated into SQL query construction without sufficient parameterization or neutralization
  • Attack surface: The workflow management functionality exposed through the WorkflowsDataServlet
  • Required access: An authenticated LogicalDOC user account with access to create or modify workflow templates
  • Trigger point: Processing a crafted workflow template name
  • Why exploitation is possible: User-controlled input may be incorporated into SQL query construction without sufficient parameterization or neutralization

Why this happens

The underlying bug is an injection flaw in which externally supplied workflow template data is treated as part of a database query rather than strictly as a value.

This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'). Blind SQL injection can allow query behavior to be inferred from application responses or timing without directly displaying database results.

The underlying bug is an injection flaw in which externally supplied workflow template data is treated as part of a database query rather than strictly as a value.

This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'). Blind SQL injection can allow query behavior to be inferred from application responses or timing without directly displaying database results.

Potential impact

  • An attacker may infer sensitive database information
  • An attacker could alter query behavior and access records beyond intended authorization boundaries
  • Application data may be modified or deleted, depending on database permissions
  • Database availability could be affected by resource-intensive or disruptive queries
  • Compromise of connected application data may support further attacks
  • An attacker may infer sensitive database information
  • An attacker could alter query behavior and access records beyond intended authorization boundaries
  • Application data may be modified or deleted, depending on database permissions
  • Database availability could be affected by resource-intensive or disruptive queries
  • Compromise of connected application data may support further attacks

General mitigation guidance

Mitigation generally focuses on ensuring that workflow values can never alter SQL command structure.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database operations
  • Avoiding dynamic SQL construction from workflow names and other user-controlled values
  • Applying allowlist-based validation for names where a constrained format is appropriate
  • Enforcing database accounts with the minimum permissions required by the application
  • Preserving authorization checks independently of database filtering logic
  • Reducing the amount of database error and timing information exposed to users
  • Treating authenticated input as untrusted unless its provenance and format are explicitly controlled

Mitigation generally focuses on ensuring that workflow values can never alter SQL command structure.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database operations
  • Avoiding dynamic SQL construction from workflow names and other user-controlled values
  • Applying allowlist-based validation for names where a constrained format is appropriate
  • Enforcing database accounts with the minimum permissions required by the application
  • Preserving authorization checks independently of database filtering logic
  • Reducing the amount of database error and timing information exposed to users
  • Treating authenticated input as untrusted unless its provenance and format are explicitly controlled

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules for string concatenation or interpolation of request data into SQL statements
  • Code review checks for database APIs that accept dynamically assembled query text
  • Runtime monitoring for unusual workflow-name patterns, repeated query errors, or abnormal response timing
  • Database auditing for unexpected query structures and access to atypical records
  • Policy enforcement requiring parameterized queries and security-focused tests for workflow input

Automated code review and SAST tools can help identify likely injection paths, but findings should be validated against actual data flow and query behavior.

Detection approaches may include:

  • Static analysis rules for string concatenation or interpolation of request data into SQL statements
  • Code review checks for database APIs that accept dynamically assembled query text
  • Runtime monitoring for unusual workflow-name patterns, repeated query errors, or abnormal response timing
  • Database auditing for unexpected query structures and access to atypical records
  • Policy enforcement requiring parameterized queries and security-focused tests for workflow input

Automated code review and SAST tools can help identify likely injection paths, but findings should be validated against actual data flow and query behavior.

Sources

SourceLink
github.comgithub.com/netero1010/Vulnerability-Disclosure/tree/main/CVE-2025-45871
logicaldoc.comlogicaldoc.com/

Frequently asked

questions

It may be exploitable through the application interface by an authenticated user, subject to network exposure and the user's ability to manage workflow templates.

An attacker generally needs a valid account and sufficient workflow permissions to submit or modify a template name processed by the vulnerable servlet.

Use parameterized database queries and ensure workflow input is handled exclusively as data, with strict validation applied as an additional control.

Combine secure database APIs, least-privilege database permissions, input-flow reviews, automated scanning, and tests that verify user-controlled values cannot change query structure.

It may be exploitable through the application interface by an authenticated user, subject to network exposure and the user's ability to manage workflow templates.

An attacker generally needs a valid account and sufficient workflow permissions to submit or modify a template name processed by the vulnerable servlet.

Use parameterized database queries and ensure workflow input is handled exclusively as data, with strict validation applied as an additional control.

Combine secure database APIs, least-privilege database permissions, input-flow reviews, automated scanning, and tests that verify user-controlled values cannot change query structure.

Find out what's already
exploitable in your codebase.