Aug 21, 2026·5 min read·14 visits
An authenticated SQL injection vulnerability in Fleet allows attackers to use the ORDER BY clause on activity endpoints as an inference oracle, enabling character-by-character database exfiltration.
A SQL injection vulnerability exists in the activity list endpoints of Fleet Device Management. Authenticated users can manipulate the order_key parameter to sort database queries by arbitrary columns, including columns not projected in the SELECT query. This flaw allows attackers to establish an inference oracle to extract sensitive information from the database.
The Fleet Device Management platform exposes endpoints for querying global and host-specific activities. These feeds assist administrators in auditing system events and monitoring state changes across enrolled devices. The endpoints are exposed to authenticated users via the HTTP endpoints /api/v1/fleet/activities and /api/v1/fleet/hosts/{id}/activities.
A weakness in the sorting logic allows users to pass unvalidated column names to the query-sorting component. The underlying application database layer constructs dynamic queries incorporating the client-supplied sorting parameters. Because structural query components like column names cannot be bound via parameterized placeholders, the application was susceptible to sorting parameter manipulation.
An attacker with an authenticated session can exploit this behavior to reference database columns containing confidential details. This leads to unauthorized data access and information disclosure by bypassing standard data access controls.
The vulnerability stems from the use of unsafe dynamic SQL generation in the ListActivities and ListHostPastActivities database abstraction layer methods. Standard SQL parameters utilize placeholders to isolate values from the execution logic. However, structural query modifiers such as ORDER BY identifiers and direction directives do not accept parameter placeholders in MySQL.
To bridge this gap, Fleet utilized a helper function named platform_mysql.AppendListOptionsWithParams to build the query. This helper attempted to sanitize inputs by wrapping identifier strings with backticks to avoid immediate syntax anomalies. The logic lacked a validation mechanism to cross-reference input fields against a list of authorized database columns.
Consequently, any arbitrary column name or SQL function supplied to the order_key parameter was integrated directly into the ORDER BY clause. This permitted the construction of an inference oracle where boolean-based assertions alter the sequence of returned rows. Attackers leverage the variations in result sorting to deduce confidential database contents piece by piece.
The vulnerability was resolved in Pull Request #49624 by transitioning to an allowlist-based query builder. Developers introduced static validation maps (OrderKeyAllowlist) to explicitly limit the columns permitted in ORDER BY clauses.
// server/activity/internal/mysql/activity.go
var listActivitiesOrderKeys = platform_mysql.OrderKeyAllowlist{
"id": "a.id",
"created_at": "a.created_at",
"user_id": "a.user_id",
"user_name": "a.user_name",
"name": "a.user_name",
"user_email": "a.user_email",
"activity_type": "a.activity_type",
"streamed": "a.streamed",
"fleet_initiated": "a.fleet_initiated",
}The fix maps user-supplied keys directly to qualified column names, explicitly leaving out sensitive columns like details or host_only. The implementation substituted AppendListOptionsWithParams with a secure variant AppendListOptionsWithParamsSecure that enforces validation.
// Pre-patch call
// activitiesQ, args = platform_mysql.AppendListOptionsWithParams(activitiesQ, args, &opt)
// Post-patch call
activitiesQ, args, err := platform_mysql.AppendListOptionsWithParamsSecure(activitiesQ, args, &opt, listActivitiesOrderKeys)
if err != nil {
return nil, nil, ctxerr.Wrap(ctx, err, "append list options")
}This pattern guarantees that any unauthorized key triggers an immediate InvalidOrderKeyError. The API handler catches this exception and replies with an HTTP 422 Unprocessable Entity response, terminating execution before sending the query to the MySQL database engine.
Exploitation requires an active user session authorized to request the activities feed. The attacker targets either the global activity feed or a host-specific activities resource. The objective is to utilize the sorting output to infer values stored in columns containing credential configurations or secret parameters.
To construct the attack, the attacker crafts an HTTP request incorporating a conditional expression within the order_key parameter. This conditional expression tests a specific assertion against a target data field:
GET /api/v1/fleet/activities?order_key=(CASE+WHEN+(SELECT+SUBSTRING(details,1,1)+FROM+activities+WHERE+id=1)='a'+THEN+id+ELSE+created_at+END)&order_direction=asc HTTP/1.1
Host: target-fleet-server.com
Authorization: Bearer <token>When the condition evaluates to true, the database orders results based on the id column. When false, ordering defaults to the created_at timestamp. By observing the structured arrangement of the array items in the response, the attacker verifies the validity of the hypothesized character. Repeating this mechanism across offset values allows the retrieval of entire strings from unprojected database cells.
The diagram below outlines the execution flow of an incoming malicious request, illustrating how the lack of validation allowed SQL injection and how the mitigation blocks unauthorized parameters before database execution.
With the patched version, the flow changes to discard invalid fields early in the processing loop:
The primary consequence of this flaw is the unauthorized extraction of database attributes. Because activities include a generic details field, they often store sensitive structural configurations, environmental variables, or internal session details. Compromising these attributes lowers the barrier for horizontal privilege escalation within the platform.
The attack vector is restricted to authenticated sessions, meaning threat actors must already have legitimate credentials or a hijacked token. This constraint reduces the immediate risk profile of the flaw compared to unauthenticated remote code execution. However, inside threats or compromised regular accounts can leverage this vulnerability to gain high-level privileges.
No public proof-of-concept exploits exist, and there are no signs of exploitation in the wild. The vulnerability does not allow modification of database contents or arbitrary command execution on the host OS.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Fleet FleetDM | < 4.89.1 | 4.89.1 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-89 |
| Attack Vector | Network (Authenticated) |
| Vulnerability Type | SQL Injection / Information Disclosure |
| CVSS v3.1 Score | 8.1 |
| Exploit Status | None / Theoretical |
| KEV Status | Not Listed |
| Affected Component | Activity List Endpoints |
The software constructs an SQL command using externally-influenced input, but it does not neutralize or incorrectly neutralizes elements that can alter the intended SQL command.
CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).
CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.
An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.
CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.
CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.
The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.