CVE-2026-104872
Multiple @opentelemetry/instrumentation-* packages expose database username via unconditional db.user span attribute
Description
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 |
Patches
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.
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.
Affected Maven artifacts (12)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm.at.opentelemetry » instrumentation-knexvia npm @opentelemetry/instrumentation-knex | < 0.65.0 | 0.65.0 |
| org.mvnpm.at.opentelemetry » instrumentation-mongoosevia npm @opentelemetry/instrumentation-mongoose | < 0.67.0 | 0.67.0 |
| org.mvnpm.at.opentelemetry » instrumentation-mysqlvia npm @opentelemetry/instrumentation-mysql | < 0.67.0 | 0.67.0 |
| org.mvnpm.at.opentelemetry » instrumentation-mysql2via npm @opentelemetry/instrumentation-mysql2 | < 0.67.0 | 0.67.0 |
| org.mvnpm.at.opentelemetry » instrumentation-pgvia npm @opentelemetry/instrumentation-pg | < 0.73.0 | 0.73.0 |
| org.mvnpm.at.opentelemetry » instrumentation-tediousvia npm @opentelemetry/instrumentation-tedious | < 0.40.0 | 0.40.0 |
| org.webjars.npm » opentelemetry__instrumentation-knexvia npm @opentelemetry/instrumentation-knex | < 0.65.0 | 0.65.0 |
| org.webjars.npm » opentelemetry__instrumentation-mongoosevia npm @opentelemetry/instrumentation-mongoose | < 0.67.0 | 0.67.0 |
| org.webjars.npm » opentelemetry__instrumentation-mysqlvia npm @opentelemetry/instrumentation-mysql | < 0.67.0 | 0.67.0 |
| org.webjars.npm » opentelemetry__instrumentation-mysql2via npm @opentelemetry/instrumentation-mysql2 | < 0.67.0 | 0.67.0 |
| org.webjars.npm » opentelemetry__instrumentation-pgvia npm @opentelemetry/instrumentation-pg | < 0.73.0 | 0.73.0 |
| org.webjars.npm » opentelemetry__instrumentation-tediousvia npm @opentelemetry/instrumentation-tedious | < 0.40.0 | 0.40.0 |
Blast radius
100% of the dependent artifacts (3) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 588 |
| 2 hops | 702 |
Most used dependents
- org.mvnpm.at.sentry » node1 usages
- org.webjars.npm » sentry__node1 usages
- org.mvnpm » zudoku0 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (8 packages) . See all on OSV
References
| Advisory | NVD CVE-2026-104872 | nvd.nist.gov |
| Package | open-telemetry/opentelemetry-js-contrib | github.com |
| Web | open-telemetry/opentelemetry-js-contrib advisory GHSA-qqmp-wf37-98f9 | github.com |
| Web | open-telemetry/opentelemetry-js-contrib pull request #3585 | github.com |
| Web | open-telemetry/opentelemetry-js-contrib commit 27e172a | github.com |
| Web | open-telemetry/opentelemetry-js-contrib commit 5b7dd0e | github.com |
