CVE-2026-104872

CVE-2026-104872 is a medium-severity security vulnerability in @opentelemetry/instrumentation-cassandra-driver (npm), affecting versions < 0.66.0. It is fixed in 0.66.0, 0.40.0, 0.46.0, 0.67.0, 0.65.0, 0.73.0.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Multiple @opentelemetry/instrumentation-* packages expose database username via unconditional db.user span attribute

Workarounds

No configuration-level workaround exists in the affected versions: the db.user attribute cannot be
suppressed without patching. As a partial mitigation, a custom SpanProcessor can be used to strip db.user from spans before they leave the process:

// Example: drop db.user in a custom SpanProcessor
class StripDbUserProcessor implements SpanProcessor {
  onStart(span: Span) {
    span.setAttribute('db.user', null);
  }
  onEnd() {}
  shutdown() { return Promise.resolve(); }
  forceFlush() { return Promise.resolve(); }
}

Users who control the downstream collector can also filter the attribute at the collector pipeline level.

Impact

Multiple @opentelemetry/instrumentation-* packages recorded the database connection username as the db.user
span attribute on every instrumented database operation. This attribute was emitted unconditionally, it was
not gated by enhancedDatabaseReporting or any other opt-in flag, and it was the default behaviour for
all users of the affected packages until the patched releases shipped on 2026-07-23.

The attribute is forwarded to every configured observability backend (Jaeger, Zipkin, Datadog, OTLP
collectors, etc.). Depending on the database account naming convention in use, the exported value may
reveal:

  • Internal service account names that disclose architecture topology.
  • Role-encoded usernames (e.g. admin_readwrite, app_readonly_prod) useful for privilege inference.
  • Database account naming patterns useful for credential enumeration.

Affected packages (all are vulnerable from the first published version through the version listed below):

Package Vulnerable range Patched version
@opentelemetry/instrumentation-cassandra-driver < 0.66.0 0.66.0
@opentelemetry/instrumentation-knex < 0.65.0 0.65.0
@opentelemetry/instrumentation-mongoose < 0.67.0 0.67.0
@opentelemetry/instrumentation-mysql < 0.67.0 0.67.0
@opentelemetry/instrumentation-mysql2 < 0.67.0 0.67.0
@opentelemetry/instrumentation-oracledb < 0.46.0 0.46.0
@opentelemetry/instrumentation-pg < 0.73.0 0.73.0
@opentelemetry/instrumentation-tedious < 0.40.0 0.40.0

CVE-2026-104872 has a CVSS score of 5.8 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.66.0, 0.40.0, 0.46.0, 0.67.0, 0.65.0, 0.73.0); upgrading removes the vulnerable code path.

Affected versions

@opentelemetry/instrumentation-cassandra-driver (< 0.66.0) @opentelemetry/instrumentation-tedious (< 0.40.0) @opentelemetry/instrumentation-oracledb (< 0.46.0) @opentelemetry/instrumentation-mongoose (< 0.67.0) @opentelemetry/instrumentation-mysql (< 0.67.0) @opentelemetry/instrumentation-knex (< 0.65.0) @opentelemetry/instrumentation-mysql2 (< 0.67.0) @opentelemetry/instrumentation-pg (< 0.73.0)

Security releases

@opentelemetry/instrumentation-cassandra-driver → 0.66.0 (npm) @opentelemetry/instrumentation-tedious → 0.40.0 (npm) @opentelemetry/instrumentation-oracledb → 0.46.0 (npm) @opentelemetry/instrumentation-mongoose → 0.67.0 (npm) @opentelemetry/instrumentation-mysql → 0.67.0 (npm) @opentelemetry/instrumentation-knex → 0.65.0 (npm) @opentelemetry/instrumentation-mysql2 → 0.67.0 (npm) @opentelemetry/instrumentation-pg → 0.73.0 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Fixed in the coordinated release on 2026-07-23 via
feat!: only emit stable http, network and database attributes (#3585).

Upgrade to the patched version listed in the table above for each instrumentation package in use.

Frequently Asked Questions

  1. What is CVE-2026-104872? CVE-2026-104872 is a medium-severity security vulnerability in @opentelemetry/instrumentation-cassandra-driver (npm), affecting versions < 0.66.0. It is fixed in 0.66.0, 0.40.0, 0.46.0, 0.67.0, 0.65.0, 0.73.0.
  2. How severe is CVE-2026-104872? CVE-2026-104872 has a CVSS score of 5.8 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2026-104872?
    • @opentelemetry/instrumentation-cassandra-driver (npm) (versions < 0.66.0)
    • @opentelemetry/instrumentation-tedious (npm) (versions < 0.40.0)
    • @opentelemetry/instrumentation-oracledb (npm) (versions < 0.46.0)
    • @opentelemetry/instrumentation-mongoose (npm) (versions < 0.67.0)
    • @opentelemetry/instrumentation-mysql (npm) (versions < 0.67.0)
    • @opentelemetry/instrumentation-knex (npm) (versions < 0.65.0)
    • @opentelemetry/instrumentation-mysql2 (npm) (versions < 0.67.0)
    • @opentelemetry/instrumentation-pg (npm) (versions < 0.73.0)
  4. Is there a fix for CVE-2026-104872? Yes. CVE-2026-104872 is fixed in 0.66.0, 0.40.0, 0.46.0, 0.67.0, 0.65.0, 0.73.0. Upgrade to this version or later.
  5. Is CVE-2026-104872 exploitable, and should I be worried? Whether CVE-2026-104872 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-104872 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-104872?
    • Upgrade @opentelemetry/instrumentation-cassandra-driver to 0.66.0 or later
    • Upgrade @opentelemetry/instrumentation-tedious to 0.40.0 or later
    • Upgrade @opentelemetry/instrumentation-oracledb to 0.46.0 or later
    • Upgrade @opentelemetry/instrumentation-mongoose to 0.67.0 or later
    • Upgrade @opentelemetry/instrumentation-mysql to 0.67.0 or later
    • Upgrade @opentelemetry/instrumentation-knex to 0.65.0 or later
    • Upgrade @opentelemetry/instrumentation-mysql2 to 0.67.0 or later
    • Upgrade @opentelemetry/instrumentation-pg to 0.73.0 or later

Stop the waste.
Protect your environment with Kodem.