OpenTelemetry JavaScript Contrib database username disclosure in telemetry spans

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2026-104872?

CVE-2026-104872 is a vulnerability classified as Insertion of Sensitive Information into Log File, affecting opentelemetry-js-contrib (affected versions: < 27e172a9e0d549559056ccd58f27d13467454156), instrumentation-cassandra-driver (affected versions: < 0.66.0), instrumentation-knex (affected versions: < 0.65.0), and 6 more products. This vulnerability is rated Medium, with a CVSS score of 5.8. Current sources do not report this vulnerability as exploited.

Overview

Original source data

OpenTelemetry JavaScript Contrib provides instrumentation libraries for collecting telemetry from JavaScript applications. Prior to versions 0.66.0 of @opentelemetry/instrumentation-cassandra-driver, 0.65.0 of @opentelemetry/instrumentation-knex, 0.67.0 of @opentelemetry/instrumentation-mongoose, @opentelemetry/instrumentation-mysql, and @opentelemetry/instrumentation-mysql2, 0.46.0 of @opentelemetry/instrumentation-oracledb, 0.73.0 of @opentelemetry/instrumentation-pg, and 0.40.0 of @opentelemetry/instrumentation-tedious, the packages add the database connection username to every instrumented database operation as the db.user span attribute. The attribute is emitted by default and is not controlled by enhancedDatabaseReporting or another opt-in setting. Configured observability backends therefore receive database account names that may expose service topology, role or environment information, and account naming patterns. This issue is fixed in versions 0.66.0, 0.65.0, 0.67.0, 0.46.0, 0.73.0, and 0.40.0 of the respective packages.

Affected products and scope

  • @opentelemetry/instrumentation-cassandra-driver: affected before 0.66.0; the confirmed patched release is 0.66.0.
  • @opentelemetry/instrumentation-knex: affected before 0.65.0; the confirmed patched release is 0.65.0.
  • @opentelemetry/instrumentation-mongoose: affected before 0.67.0; the confirmed patched release is 0.67.0.
  • @opentelemetry/instrumentation-mysql: affected before 0.67.0; the confirmed patched release is 0.67.0.
  • @opentelemetry/instrumentation-mysql2: affected before 0.67.0; the confirmed patched release is 0.67.0.
  • @opentelemetry/instrumentation-oracledb: affected before 0.46.0; the confirmed patched release is 0.46.0.
  • @opentelemetry/instrumentation-pg: affected before 0.73.0; the confirmed patched release is 0.73.0.
  • @opentelemetry/instrumentation-tedious: affected before 0.40.0; the confirmed patched release is 0.40.0.

The record also marks the opentelemetry-js-contrib repository as affected before a commit boundary, but it does not provide a human-readable release boundary for that entry. Parallel branches or releases not listed separately remain subject to independent verification.

Technical details

These packages create database spans for instrumented operations. In affected versions, the database connection username is copied into the db.user span attribute for every instrumented operation. Emission is unconditional and is not gated by enhancedDatabaseReporting or another opt-in control. The sensitive value is the username configured for the database connection, which is then carried by the application's telemetry pipeline to configured backends. No specific attacker-supplied request parameter is identified in the evidence; exposure requires a vulnerable package and a database operation that generates a span, after which a party able to access the telemetry may read the value. The evidence identifies CWE-532, but does not describe a query parser flaw, credential validation bypass, or specific collector access-control failure.

Exploitability

This is information disclosure through observability data, not a code execution path. The normal trigger is an affected package performing instrumentation for a database operation, causing the username to enter a span and be forwarded to a telemetry backend. The record characterizes the reachability as network-based and does not require user interaction, but the exact path by which an attacker would reach the telemetry backend depends on the deployment and is not documented. The supplied record marks public_exploit as false and known_exploited as null; that status does not prove that exported telemetry was never accessed without authorization.

Technical impact

The confirmed technical outcome is that database connection usernames are unintentionally included in telemetry spans. A party able to read the observability data may infer service topology, account roles, and naming patterns, extending the impact from the application process to the telemetry systems that receive the spans. The evidence does not show that the issue permits data modification, service disruption, database authentication bypass, or direct recovery of passwords. Actual impact depends on telemetry read access, the configured backend scope, and the information encoded in the organization's account names.

Business impact

  • Configured observability backends may store or display database account usernames alongside application traces.
  • If an unauthorized party can read the telemetry, the value may help infer internal service topology, account roles, or production and development environments.
  • Account naming patterns may increase reconnaissance value and support account enumeration, but a username alone does not demonstrate login access or database privileges.
  • Actual exposure depends on the configured exporters, telemetry retention, and access controls for each backend.

Remediation

  1. Upgrade each instrumentation package in use to its corresponding confirmed patched release: 0.66.0 for Cassandra Driver, 0.65.0 for Knex, 0.67.0 for Mongoose, MySQL, and MySQL2, 0.46.0 for OracleDB, 0.73.0 for PostgreSQL, or 0.40.0 for Tedious.
  2. Redeploy the application and verify that the dependency tree or runtime artifact actually contains the patched package releases. Do not treat a fix for one package as evidence that another package or parallel branch is safe.
  3. There is no configuration-level workaround in the affected releases for disabling db.user. If an upgrade is not immediately possible, use a custom SpanProcessor to remove db.user before spans leave the process, or filter the attribute in the collector pipeline when the organization controls the collector.
  4. Review access controls and retention policies for existing telemetry because spans emitted before the change may still contain usernames. This reduces continued exposure but does not replace upgrading the packages.

Detection

  • Inventory lockfiles, manifests, and dependency trees for the affected @opentelemetry/instrumentation-* packages covering Cassandra, Knex, Mongoose, MySQL, MySQL2, OracleDB, PostgreSQL, and Tedious.
  • Verify the runtime version of each package against the affected ranges and patched releases listed below. Do not infer that a parallel branch is safe without checking it separately.
  • Inspect representative traces or spans from production and staging to determine whether db.user contains database usernames.
  • Review the export pipeline and receiving backends, including Jaeger, Zipkin, Datadog, or OTLP collectors, to identify where the value may have been stored or displayed.
  • Review access logs and read permissions for observability systems as a precaution. These are additional checks, not specific indicators supplied by the advisory; absence of access evidence does not prove that the data was never read.
Sources (16)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.