Skip to content
Heist/ feed
Back to feed
Medium

Token in custom credentials object can leak through logs in ydb-go-sdk

Type: advisorySources: OSV

ydb-go-sdk is a pure Go native and database/sql driver for the YDB platform. Since ydb-go-sdk v3.48.6 if you use a custom credentials object (implementation of interface Credentials it may leak into logs. This happens because this object could be serialized into an error message using `fmt.Errorf("something went wrong (credentials: %q)", credentials)` during connection to the YDB server. If such logging occurred, a malicious user with access to logs could read sensitive information (i.e. credentials) information and use it to get access to the database. ydb-go-sdk contains this problem in versions from v3.48.6 to v3.53.2. The fix for this problem has been released in version v3.53.3. Users are advised to upgrade. Users unable to upgrade should implement the `fmt.Stringer` interface in your custom credentials type with explicit stringify of object state.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-45825
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 18:23 UTC · Revision 1

Source evidence

Token in custom credentials object can leak through logs in ydb-go-sdk

core-osv · Original source

Published 19 Oct 2023, 18:22 UTC

ydb-go-sdk is a pure Go native and database/sql driver for the YDB platform. Since ydb-go-sdk v3.48.6 if you use a custom credentials object (implementation of interface Credentials it may leak into logs. This happens because this object could be serialized into an error message using `fmt.Errorf("something went wrong (credentials: %q)", credentials)` during connection to the YDB server. If such logging occurred, a malicious user with access to logs could read sensitive information (i.e. credentials) information and use it to get access to the database. ydb-go-sdk contains this problem in versions from v3.48.6 to v3.53.2. The fix for this problem has been released in version v3.53.3. Users are advised to upgrade. Users unable to upgrade should implement the `fmt.Stringer` interface in your custom credentials type with explicit stringify of object state.

osv:CVE-2023-45825
Complete source record
{
  "id": "f0e4b210be791fb513d5f6c1162f780149605d72d37eac9a8087d8590146cdbc",
  "url": "https://osv.dev/vulnerability/CVE-2023-45825",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Token in custom credentials object can leak through logs in ydb-go-sdk",
    "summary": "ydb-go-sdk is a pure Go native and database/sql driver for the YDB platform. Since ydb-go-sdk v3.48.6 if you use a custom credentials object (implementation of interface Credentials it may leak into logs. This happens because this object could be serialized into an error message using `fmt.Errorf(\"something went wrong (credentials: %q)\", credentials)` during connection to the YDB server. If such logging occurred, a malicious user with access to logs could read sensitive information (i.e. credentials) information and use it to get access to the database. ydb-go-sdk contains this problem in versions from v3.48.6 to v3.53.2. The fix for this problem has been released in version v3.53.3. Users are advised to upgrade. Users unable to upgrade should implement the `fmt.Stringer` interface in your custom credentials type with explicit stringify of object state.",
    "evidence": "osv:CVE-2023-45825",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2023-45825",
      "aliases": [
        "CVE-2023-45825",
        "GHSA-q24m-6h38-5xj8",
        "GO-2023-2137"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/ydb-platform/ydb-go-sdk",
              "type": "GIT",
              "events": [
                {
                  "introduced": "16a4b6106d2d4173bdd50c398242d7302fcd6f52"
                },
                {
                  "fixed": "899fac3391850e6329ea3fdf991901c877aa3310"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "3.48.6"
                      },
                      {
                        "fixed": "3.53.3"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:ydb:ydb-go-sdk:*:*:*:*:*:go:*:*",
                    "range": [
                      {
                        "introduced": "3.48.6"
                      },
                      {
                        "fixed": "3.53.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3.53.2",
            "v3.53.1",
            "v3.53.0",
            "v3.52.3",
            "v3.52.2",
            "v3.52.1",
            "v3.52.0",
            "v3.51.3",
            "v3.51.3-rc0",
            "v3.51.2",
            "v3.51.1",
            "v3.51.0",
            "v3.50.0",
            "v3.49.1",
            "v3.49.0",
            "v3.48.8",
            "v3.48.7",
            "v3.48.7-rc0",
            "v3.48.6"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-45825.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:38.383599612Z",
      "provider": "osv",
      "references": [
        "https://github.com/ydb-platform/ydb-go-sdk/blob/master/credentials/credentials.go#L10",
        "https://github.com/ydb-platform/ydb-go-sdk/blob/v3.48.6/internal/balancer/balancer.go#L71",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/45xxx/CVE-2023-45825.json",
        "https://github.com/ydb-platform/ydb-go-sdk/security/advisories/GHSA-q24m-6h38-5xj8",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-45825",
        "https://github.com/ydb-platform/ydb-go-sdk/pull/859"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-532"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/45xxx/CVE-2023-45825.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-45825",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 505632,
  "published_at": "2023-10-19T18:22:31.034+00:00"
}