Summary
An input validation flaw in the correlations over-correlation endpoint allowed an authenticated user to control the order query parameter, overriding server-defined result ordering.
Depending on downstream processing in the data access layer, this could manipulate query ordering and in some cases increase the risk of unsafe query construction, though current evidence suggests the primary impact is limited to query manipulation.
Affected context
The issue appears in the correlations over-correlation endpoint, specifically within CorrelationsController::overCorrelations(), where request parameters are mapped into query options.
Deployments are affected when:
- The endpoint exposes an
order(or equivalent) parameter directly controlled by the client - The application passes this parameter into the data access layer with insufficient normalization or whitelisting
- The data access layer builds query ordering expressions based on this value, potentially altering execution plans or result presentation
Exploit preconditions
- Attack surface: HTTP(S) API endpoint handling correlation over-correlation queries
- Required access: Authenticated user with permission to call the over-correlation endpoint
- Trigger point: Supplying crafted values in the
order(or similarly mapped) request parameter - Why exploitation is possible: The server trusted client-controlled input for the ordering clause without strict validation, allowing the attacker to override default server-side ordering and influence how the underlying query is constructed and executed
Why this happens
The root cause is a lack of strict input validation and control over a query-shaping parameter used by the backend.
Instead of constraining the order field to a small, server-defined set of safe values, the endpoint accepted user-controlled input and propagated it into the data access layer.
This pattern maps to CWE-20: Improper Input Validation, where the application fails to validate, normalize, or reject unexpected user input before it affects internal logic and query construction.
While the primary symptom is ordering manipulation, in some architectures similar patterns can expand into more severe query construction issues if concatenated or interpolated unsafely.
Potential impact
- An authenticated user could override the intended default ordering of over-correlation results
- Application behavior and user experience may be manipulated by presenting data in attacker-chosen order
- Query execution patterns could be influenced, potentially affecting performance or resource usage
- In some backends, this pattern could increase exposure to unsafe query construction if combined with other weaknesses
General mitigation guidance
Effective mitigation focuses on keeping query-shaping logic under server control and strictly validating all user input that influences queries.
Recommended patterns include:
- Restrict ordering, sorting, and filtering parameters to an explicit allowlist of field names and directions, represented internally as enums or constants
- Map client input to server-defined options rather than passing raw parameter values into the data access layer
- Centralize query-building logic and avoid constructing ordering clauses directly from user-provided strings
- Apply defense-in-depth at the data access layer by rejecting unknown or malformed ordering instructions
- Ensure that sensitive query behavior (such as ordering by derived or computed expressions) is never directly influenced by client input
How teams detect issues like this
Detection generally relies on identifying places where user input can shape queries beyond simple value binding.
Possible strategies include:
- Static analysis rules that flag direct use of request parameters in ORDER BY, GROUP BY, or similar query-construction paths
- Code review checklists that ask reviewers to confirm that sorting and ordering options are restricted to server-defined allowlists
- Logging and monitoring of unexpected or anomalous ordering parameter values to detect abuse patterns
- Automated tooling in CI that searches for controllers or services where request parameters are passed unvalidated to repositories or query builders

