{"id":"CVE-2023-45825","aliases":["CVE-2023-45825","GHSA-q24m-6h38-5xj8","GO-2023-2137"],"related":[],"kind":"vulnerability","state":"published","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nSince [ydb-go-sdk/v3.48.6](https://github.com/ydb-platform/ydb-go-sdk/blob/v3.48.6/internal/balancer/balancer.go#L71) if you use a custom credentials object (implementation of interface [Credentials](https://github.com/ydb-platform/ydb-go-sdk/blob/master/credentials/credentials.go#L10)) 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. Printf func use placeholder `%q` for string representation of argument with quotes. If an argument implements interface `fmt.Stringer`, it will used through `String()` func. In other cases used fallback - serialization with reflection.\n\nIf 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.\n\nWho is impacted: applications with custom credentials object with an explicit token field.\n\nA leak could have occurred if all of these conditions were met simultaneously:\n1) The credentials object does not implement the `fmt.Stringer` interface (does not have a `String()` method) - potentially these are custom credentials. Official credentials have a `String()` method.\n2) There was an error connecting to YDB during driver creation via `ydb.Open(...)`.\n3) Some logging system was configured (`ydb-go-sdk` does not log such errors by default).\n4) The connection error was logged into a system that a malicious user had access to.\n\n### Patches\n`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 ([PR](https://github.com/ydb-platform/ydb-go-sdk/pull/859)).\n\n### Workarounds\nImplement the `fmt.Stringer` interface in your custom credentials type with explicit stringify of object state.","format":"markdown","source":"ghsa"},{"lang":"en","text":"A custom credentials object that does not implement the fmt.Stringer interface may leak sensitive information (e.g., credentials) via logs.","format":"markdown","source":"go"},{"lang":"es","text":"ydb-go-sdk es un controlador de base de datos/sql y nativo de Go puro para la plataforma YDB. Desde ydb-go-sdk v3.48.6, si usa un objeto de credenciales personalizado (implementación de la interfaz Credenciales, puede filtrarse en los registros. Esto sucede porque este objeto podría serializarse en un mensaje de error usando `fmt.Errorf(\"something went wrong (credentials: %q)\", credenciales)` durante la conexión al servidor YDB. Si se produjera dicho registro, un usuario malintencionado con acceso a los registros podría leer información confidencial (es decir, credenciales) y utilizarla para obtener acceso a la base de datos. ydb- go-sdk contiene este problema en las versiones de v3.48.6 a v3.53.2. La solución para este problema se publicó en la versión v3.53.3. Se recomienda a los usuarios que actualicen. Los usuarios que no puedan actualizar deben implementar la interfaz `fmt.Stringer` en su tipo de credenciales personalizadas con cadena explícita del estado del objeto.","source":"nvd"}],"published":"2023-10-19T17:10:00.000Z","modified":"2026-09-10T03:50:03.881Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-532"],"affected":[{"ranges":[{"version":">= 3.48.6, < 3.53.3","status":"affected"}],"vendor":"ydb-platform","product":"ydb-go-sdk","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"3.48.6","status":"affected","fixed":"3.53.3"}],"ecosystem":"Go","package":"github.com/ydb-platform/ydb-go-sdk/v3","purl":"pkg:golang/github.com/ydb-platform/ydb-go-sdk/v3","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.48.6","status":"affected","fixed":"3.53.3"}],"ecosystem":"Go","package":"github.com/ydb-platform/ydb-go-sdk/v3","purl":"pkg:golang/github.com/ydb-platform/ydb-go-sdk/v3","source":"go"},{"ranges":[{"status":"affected","introduced":"3.48.6","fixed":"3.53.2"}],"vendor":"ydb","product":"ydb-go-sdk","cpe":"cpe:2.3:a:ydb:ydb-go-sdk:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ydb-platform/ydb-go-sdk/security/advisories/GHSA-q24m-6h38-5xj8","tags":["advisory","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/ydb-platform/ydb-go-sdk/pull/859","tags":["fix","issue-tracking","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/ydb-platform/ydb-go-sdk/blob/master/credentials/credentials.go#L10","tags":["product","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ydb-platform/ydb-go-sdk/blob/v3.48.6/internal/balancer/balancer.go#L71","tags":["product","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-45825","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ydb-platform/ydb-go-sdk/commit/a0d92057c4e1bbdc5e85ae8d649edb0232b8fd4c","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/ydb-platform/ydb-go-sdk","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-12T17:40:24.600Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-45825","url":"https://www.cve.org/CVERecord?id=CVE-2023-45825","licence":"CVE Terms of Use","modified":"2024-09-12T17:52:08.400Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q24m-6h38-5xj8","url":"https://github.com/advisories/GHSA-q24m-6h38-5xj8","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:03.881Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2023-2137","url":"https://pkg.go.dev/vuln/GO-2023-2137","licence":"CC-BY-4.0","modified":"2024-05-20T16:03:47.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-45825","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-45825","licence":"Public domain","modified":"2026-06-17T06:29:36.173Z"}],"updatedAt":"2026-11-25T22:58:28.942Z","epss":{"score":0.00234,"percentile":0.15388,"date":"2026-12-01T12:00:22.000Z"}}