/

CVE-2026-85388

Severity:

HIGH RISK

(8.1)

SQL Injection (CWE-89) in Worklenz Pagination Helpers

CVE-2026-85388

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized database access and sensitive data disclosure

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

Worklenz through version 3.0.0 does not properly validate the sort-field query parameter used by pagination helpers, allowing authenticated users to influence PostgreSQL ORDER BY expressions. This may enable time-based or boolean-based blind SQL injection and unauthorized extraction of sensitive data, including password hashes belonging to other tenants.

Affected context

The vulnerability occurs in Worklenz pagination functionality when a request-controlled sort-field parameter is incorporated into a PostgreSQL ORDER BY clause without sufficient validation. It is particularly risky in multi-tenant deployments where database queries can access records beyond the requesting user's tenant boundary, and represents an incomplete remediation of a prior related issue.

Exploit preconditions

  • Attack surface: Authenticated application endpoints that use pagination helpers
  • Required access: Valid user credentials and permission to submit requests containing pagination parameters
  • Trigger point: Processing of a sort-field query parameter during database query construction
  • Why exploitation is possible: The parameter can influence SQL expression handling in an ORDER BY clause, enabling controlled boolean or timing behavior and inference of database contents

Why this happens

The underlying bug is insufficient allowlisting and normalization of a user-controlled value used as a SQL identifier or expression. Instead of mapping accepted sort options to fixed server-side column definitions, the application permits input to affect query syntax, which maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection). Parameter binding alone is generally insufficient for dynamic identifiers or ORDER BY expressions unless the application uses a trusted mapping.

Potential impact

  • Attackers may infer sensitive database contents through blind SQL injection
  • Password hashes and other credentials may be disclosed
  • Data belonging to other tenants could be exposed
  • Database confidentiality and tenant isolation may be weakened
  • Further attacks may become possible if exposed data supports account compromise

General mitigation guidance

Mitigation generally focuses on ensuring that dynamic ordering is controlled entirely by trusted application logic.

Common defensive patterns include:

  • Mapping each accepted sort option to a fixed, server-side column or expression
  • Rejecting unknown, malformed, or unexpected sort-field values by default
  • Keeping user-controlled input out of SQL syntax and using parameterization for values
  • Enforcing tenant-scoped predicates independently of sorting and pagination logic
  • Applying least-privilege database permissions and limiting access to credential data
  • Maintaining regression tests for previously reported injection paths and related helper functions

How teams detect issues like this

Detection approaches commonly include:

  • Static analysis rules for string interpolation or concatenation of request parameters into SQL statements
  • Code review checks for dynamic ORDER BY, GROUP BY, column, and table expressions
  • Tests using unexpected sort names, boolean variations, and timing-sensitive input in controlled environments
  • Database monitoring for anomalous query timing, repeated pagination requests, and cross-tenant access patterns
  • Policy enforcement requiring approved allowlists for dynamic SQL identifiers
  • Automated security review tools can help identify similar query-construction patterns across pagination helpers

Sources

SourceLink
github.comgithub.com/Worklenz/worklenz
github.comgithub.com/Worklenz/worklenz/blob/v3.0.0/worklenz-backend/src/controllers/job-titles-controller.ts
github.comgithub.com/Worklenz/worklenz/blob/v3.0.0/worklenz-backend/src/controllers/worklenz-controller-base.ts
github.comgithub.com/Worklenz/worklenz/issues/395
github.comgithub.com/Worklenz/worklenz/security/advisories/GHSA-f2f8-2ppj-85pf
vulncheck.comvulncheck.com/advisories/worklenz-through-3.0.0-sql-injection-via-the-sort-field-query-parameter

Frequently asked

questions

It can be exploitable through exposed Worklenz application endpoints when an attacker has valid authentication and can control the relevant pagination parameter.

The described attack requires an authenticated user account with access to an endpoint that invokes the affected pagination helper. The account's normal privileges and tenant boundaries may affect the reachable data, but insufficient query isolation can increase exposure.

Replace user-controlled SQL fragments with a strict server-side allowlist that maps accepted sort options to fixed database expressions, while preserving parameterized handling for ordinary query values.

Review every dynamic SQL construction path, test tenant isolation independently of filtering and sorting, enforce least-privilege database access, and add regression coverage for malformed and unexpected query parameters.

Find out what's already
exploitable in your codebase.