CVE-2023-45825
Token in custom credentials object can leak through logs in ydb-go-sdk
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.5
Token in custom credentials object can leak through logs in ydb-go-sdk
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.
- Record
CVE-2023-45825- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-532
- Updated
- 2026-11-02
EUVDEUVD-2023-2791
5.5
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.
- Record
EUVD-2023-2791- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-q24m-6h38-5xj8
5.5
ydb-go-sdk token in custom credentials object can leak through logs
Impact
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. 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.
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.
Who is impacted: applications with custom credentials object with an explicit token field.
A leak could have occurred if all of these conditions were met simultaneously:
- The credentials object does not implement the
fmt.Stringerinterface (does not have aString()method) - potentially these are custom credentials. Official credentials have aString()method. - There was an error connecting to YDB during driver creation via
ydb.Open(...). - Some logging system was configured (
ydb-go-sdkdoes not log such errors by default). - The connection error was logged into a system that a malicious user had access to.
Patches
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).
Workarounds
Implement the fmt.Stringer interface in your custom credentials type with explicit stringify of object state.
- Record
GHSA-q24m-6h38-5xj8- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-532
- Updated
- 2026-11-02
NVD
5.5
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.
- Record
CVE-2023-45825- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-532
- Updated
- 2026-11-02
OSV
5.5
Token in custom credentials object can leak through logs in ydb-go-sdk
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.
- Record
CVE-2023-45825- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-532
- Updated
- 2026-11-02
OSVGHSA-q24m-6h38-5xj8
5.5
ydb-go-sdk token in custom credentials object can leak through logs
Impact
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. 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.
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.
Who is impacted: applications with custom credentials object with an explicit token field.
A leak could have occurred if all of these conditions were met simultaneously:
- The credentials object does not implement the
fmt.Stringerinterface (does not have aString()method) - potentially these are custom credentials. Official credentials have aString()method. - There was an error connecting to YDB during driver creation via
ydb.Open(...). - Some logging system was configured (
ydb-go-sdkdoes not log such errors by default). - The connection error was logged into a system that a malicious user had access to.
Patches
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).
Workarounds
Implement the fmt.Stringer interface in your custom credentials type with explicit stringify of object state.
- Record
GHSA-q24m-6h38-5xj8- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-532
- Updated
- 2026-11-02
OSVGO-2023-2137 No score
Credentials leak in github.com/ydb-platform/ydb-go-sdk/v3
A custom credentials object that does not implement the fmt.Stringer interface may leak sensitive information (e.g., credentials) via logs.
- Record
GO-2023-2137- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/ydb-platform/ydb-go-sdk/v3Go |
3.48.6 up to 3.53.3 | 3.53.3 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-45825 is a medium vulnerability (CVSS 5.5) in Ydb Ydb-go-sdk, published October 19, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.23%, the 14th percentile. Fixed in github.com/ydb-platform/ydb-go-sdk/v3 3.53.3.
References
github.com/ydb-platform/ydb-go-sdk/security/advisories/GHSA-q24m-6h38-5xj8
github.com/ydb-platform/ydb-go-sdk/pull/859
github.com/ydb-platform/ydb-go-sdk/blob/master/credentials/credentials.go
github.com/ydb-platform/ydb-go-sdk/blob/v3.48.6/internal/balancer/balancer.go
github.com/ydb-platform/ydb-go-sdk/commit/a0d92057c4e1bbdc5e85ae8d649edb0232b8fd4c
nvd.nist.gov/vuln/detail/CVE-2023-45825
github.com/advisories/GHSA-q24m-6h38-5xj8
github.com/CVEProject/cvelistV5/tree/main/cves/2023/45xxx/CVE-2023-45825.json
github.com/ydb-platform/ydb-go-sdk