Jul 29, 2026·5 min read·95 visits
Flaws in the OpenTelemetry JFlex SQL sanitizer allowed unredacted database credentials to leak into trace spans when using double quotes or executing multi-statement queries.
A sensitive data exposure vulnerability (CWE-532) exists in OpenTelemetry Java Instrumentation prior to version 2.28.0. The JDBC auto-instrumentation component's SQL statement sanitizer contains lexer flaws that prevent the correct redaction of administrative passwords under specific conditions, such as when double-quotes represent identifiers or during multi-statement executions separated by semicolons.
The OpenTelemetry Java Agent auto-instruments JDBC calls to capture execution statistics and structural database statement properties. To ensure privacy compliance and prevent credential leakage, the agent uses a JFlex-generated SQL scanner to sanitize incoming statements. This mechanism replaces raw literals with query parameter placeholders while retaining identifiers such as table and column names to provide telemetry context.
Prior to version 2.28.0, the SQL sanitizer failed to redact credentials under specific edge cases. Specifically, administrative commands that format credentials in unquoted or double-quoted blocks bypassed sanitization filters. This behavior allowed plaintext database passwords to leak into trace span attributes, such as db.statement, where they were subsequently exported to downstream APM collectors and monitoring backends.
The underlying vulnerability consists of two structural bugs in the JFlex-generated sanitizer states (SqlSanitizer.jflex and SqlSanitizerWithSummary.jflex).
The first bug involves the processing of double-quoted values. When the SQL sanitizer operates with the configuration flag doubleQuotesAreIdentifiers enabled, double-quoted tokens are evaluated as database identifiers instead of string literals. In database administrative operations, such as CREATE USER app_user PASSWORD "Secret123", the lexer classifies the password block as an identifier. Because identifiers are kept in clear-text to preserve schema tracking context, the password bypasses redaction filters.
The second bug is a state-tracking failure in multi-statement query batches. When the agent receives a multi-query batch separated by semicolons, such as SELECT 1; CONNECT user PASSWORD "secret", the state machine evaluates the first statement and transitions its internal operation tracker to a active query state (e.g., Select). Because the previous lexer implementation lacked an explicit state-reset transition rule upon encountering a semicolon, the operation variable remained set to Select rather than reverting to NoOp.INSTANCE. Consequently, when parsing the subsequent administrative command, the lexer did not execute keyword matching rules reserved for a fresh parser state, leaving the database credentials unredacted.
An examination of the original SqlSanitizer.jflex configuration reveals that the parser attempted to handle administrative statement truncation based solely on initial keyword state matching. This approach was highly fragile and failed to clear state boundaries correctly.
The patch implemented in commit 7ac7fa6fda6c2e3b65bc5d3c6eba050311a49511 addresses these issues by introducing structural state variables and an explicit semicolon reset rule:
private boolean statementStart = true;
private boolean passwordSanitizationEnabled = false;
private boolean identifiedBySanitizationEnabled = false;To correct the multi-statement boundary bug, a dedicated transition rule for semicolons was added to re-initialize the scanner's tracking states between statements within a single query execution block:
";" {
if (!insideComment) {
statementStart = true;
passwordSanitizationEnabled = false;
identifiedBySanitizationEnabled = false;
}
appendCurrentFragment();
if (isOverLimit()) return YYEOF;
}Additionally, the patch deprecates early-exit statement truncation on raw keywords like CONNECT or USER. Instead, matching these keywords sets tracking flags that indicate password sanitization is required. When the parser encounters explicit PASSWORD or IDENTIFIED BY tokens, it checks these flags and applies immediate replacement regardless of quoting style:
"PASSWORD" {
boolean passwordTokenIsIdentifier = false;
if (!insideComment && !extractionDone) {
markStatementStarted();
passwordTokenIsIdentifier = operation.handleIdentifier();
extractionDone = passwordTokenIsIdentifier;
}
appendCurrentFragment();
if (!passwordTokenIsIdentifier && !insideComment && shouldSanitizeRemainderAfterPassword()) {
builder.append(" ?");
return YYEOF;
}
if (isOverLimit()) return YYEOF;
}Triggering this vulnerability does not require an active exploit script. Rather, standard operations executing multi-statement or double-quoted credential administration commands under an instrumented JVM environment trigger the bug.
Consider an administrative microservice running with an OpenTelemetry Java Agent (< 2.28.0) that executes the following database query via JDBC:
SELECT 1; CONNECT admin PASSWORD "MySecr3tP@ss"Because of the semicolon state-retention bug, the parser evaluates the entire command stream under the initial Select context. The lexer ignores the CONNECT keyword and skips password redaction. The resulting span is recorded and exported with the plaintext password embedded directly inside the db.statement attribute:
{
"traceId": "9f0862089cba8c07e0b57e79c947ff1a",
"attributes": {
"db.system": "hana",
"db.statement": "SELECT ?; CONNECT admin PASSWORD \"MySecr3tP@ss\""
}
}Once exported, the credentials reside in clear-text in downstream telemetry databases (e.g., Elasticsearch, Tempo, or Jaeger), exposing administrative passwords to users with trace-viewing privileges.
The exposure of database administrative passwords in centralized telemetry databases poses a serious threat to enterprise security. Monitoring, logging, and tracing pipelines are often configured with broader access permissions and lower threat-protection controls than production databases.
An attacker who gains unauthorized access to log aggregators or APM dashboard search utilities can easily harvest administrative database credentials by searching for keywords like PASSWORD or IDENTIFIED BY. These credentials can then be used to perform unauthorized operations, exfiltrate business data, or gain initial lateral entry into target network environments.
While the direct CVSS 3.1 score is evaluated at 6.5 (Medium) due to the lack of immediate write or denial-of-service capability on the host, the downstream exploitation potential of exposed administrative credentials warrants swift remediation.
The primary remediation strategy is to upgrade the OpenTelemetry Java Agent and its associated dependencies to version 2.28.0 or higher. This upgrade updates the JFlex scanner definitions to enforce correct state transitions and robustly redact password literals.
For environments where immediate upgrades are not feasible, the following defense-in-depth mitigations should be enforced:
Enforce Parameterization: Avoid executing raw query strings that contain inline passwords. Migrate all user provisioning or connections to parameterized stored procedures or execution APIs.
Disable Multi-Query Processing: Configure JDBC connection profiles to reject multi-statement executions, ensuring that queries are parsed individually and do not bypass state boundaries.
Ingestion Filtering: Deploy processing rules on the OpenTelemetry Collector (or intermediate log stashes) to scrub any plain-text parameters matching password keywords before storage.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
opentelemetry-java-instrumentation OpenTelemetry | < 2.28.0 | 2.28.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-532 |
| Attack Vector | Network |
| CVSS Score | 6.5 |
| EPSS Score | 0.00224 |
| Impact | Sensitive Data Exposure |
| Exploit Status | Proof of Concept (PoC) documented |
| KEV Status | Not in CISA KEV |
The product writes sensitive information to log files, making it available to attackers who have access to the log repository.
File Browser versions prior to 2.63.17 contain an authorization and state-management flaw in the BoltDB storage backend. When an authenticated user deletes a shared directory via an HTTP request with a trailing slash (e.g., DELETE /api/resources/a/), the share cleanup routine queries the database index using the unnormalized path before stripping the trailing slash. Because canonical share paths are stored without trailing slashes (e.g., /a), the database prefix query fails to match the parent directory share record. If a directory with the same name is later recreated, the dormant public share hash automatically reactivates and exposes the new directory contents to unauthenticated users.
An uncontrolled memory allocation vulnerability exists in ag-psd versions prior to 31.0.0. When parsing Adobe Photoshop Document (PSD) files, the readPsd() function reads image dimensions and color depth directly from the file header and allocates off-heap typed arrays without validating whether the requested memory size is proportional to the input stream or bounded by operational thresholds. An unauthenticated attacker can supply a crafted 52-byte PSD payload that triggers an immediate 3.35 GB memory allocation, resulting in process termination via the operating system Out-Of-Memory (OOM) killer.
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.