Summary
ydb-go-sdk token in custom credentials object can leak through logs
Workarounds
Implement the fmt.Stringer interface in your custom credentials type with explicit stringify of object state.
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.
CVE-2023-45825 has a CVSS score of 5.5 (Medium). The vector is requires local access, low 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 (3.53.3); upgrading removes the vulnerable code path.
Affected versions
Security releases
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
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).
Frequently Asked Questions
- What is CVE-2023-45825? CVE-2023-45825 is a medium-severity security vulnerability in github.com/ydb-platform/ydb-go-sdk/v3 (go), affecting versions >= 3.48.6, < 3.53.3. It is fixed in 3.53.3.
- How severe is CVE-2023-45825? CVE-2023-45825 has a CVSS score of 5.5 (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.
- Which versions of github.com/ydb-platform/ydb-go-sdk/v3 are affected by CVE-2023-45825? github.com/ydb-platform/ydb-go-sdk/v3 (go) versions >= 3.48.6, < 3.53.3 is affected.
- Is there a fix for CVE-2023-45825? Yes. CVE-2023-45825 is fixed in 3.53.3. Upgrade to this version or later.
- Is CVE-2023-45825 exploitable, and should I be worried? Whether CVE-2023-45825 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
- What actually determines whether CVE-2023-45825 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.
- How do I fix CVE-2023-45825? Upgrade
github.com/ydb-platform/ydb-go-sdk/v3to 3.53.3 or later.