CVE-2023-45825: Github.com/ydb platform/ydb go sdk/v3 Ydb-go-sdk Token Vulnerability
MODERATECVE-2023-45825 is a MODERATE (CVSS 5.5) ydb-go-sdk token vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Github.com/ydb platform/ydb go sdk/v3 libraries in the Go ecosystem. The issue involves ydb-go-sdk token in custom credentials object can leak through logs. Remediation is available by upgrading affected packages to version 3.53.3.
CVE-2023-45825 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2023-45825
To remediate this vulnerability, upgrade all affected Github.com/ydb platform/ydb go sdk/v3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/ydb-platform/ydb-go-sdk/v3 to 3.53.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/ydb-platform/ydb-go-sdk/v3
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-45825, inspect your project dependencies for Github.com/ydb platform/ydb go sdk/v3:
inspect dependencies for github.com/ydb-platform/ydb-go-sdk/v3
Analyze the terminal output to locate any version of Github.com/ydb platform/ydb go sdk/v3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.53.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In Github.com/ydb platform/ydb go sdk/v3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-45825 Affected Github.com/ydb platform/ydb go sdk/v3 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ydb-platform/ydb-go-sdk/v3
|
Go |
≥ 3.48.6
< 3.53.3
|
3.53.3
|
References
Frequently Asked Questions
What is CVE-2023-45825?
Which Github.com/ydb platform/ydb go sdk/v3 versions are affected?
What version fixes CVE-2023-45825?
Is github.com/ydb-platform/ydb-go-sdk/v3 affected?
What is the CVSS score of CVE-2023-45825?
What CWE is associated with CVE-2023-45825?
How can I check Go dependencies for CVE-2023-45825?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q24m-6h38-5xj8",
"modified" : "2023-10-24T22:48:40Z",
"published" : "2023-10-19T17:10:00Z",
"aliases" : [ "CVE-2023-45825" ],
"summary" : "ydb-go-sdk token in custom credentials object can leak through logs",
"details" : "### 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ydb-platform/ydb-go-sdk/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.48.6"
}, {
"fixed" : "3.53.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ydb-platform/ydb-go-sdk/security/advisories/GHSA-q24m-6h38-5xj8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-45825"
}, {
"type" : "WEB",
"url" : "https://github.com/ydb-platform/ydb-go-sdk/pull/859"
}, {
"type" : "WEB",
"url" : "https://github.com/ydb-platform/ydb-go-sdk/commit/a0d92057c4e1bbdc5e85ae8d649edb0232b8fd4c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ydb-platform/ydb-go-sdk"
}, {
"type" : "WEB",
"url" : "https://github.com/ydb-platform/ydb-go-sdk/blob/master/credentials/credentials.go#L10"
}, {
"type" : "WEB",
"url" : "https://github.com/ydb-platform/ydb-go-sdk/blob/v3.48.6/internal/balancer/balancer.go#L71"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-532" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-10-19T17:10:00Z",
"nvd_published_at" : "2023-10-19T19:15:16Z"
}
}