{"id":"GHSA-7fxj-fr3v-r9gj","summary":"TiDB vulnerable to Use of Externally-Controlled Format String","details":"TiDB server (importer CLI tool) prior to version 6.4.0 & 6.1.3 is vulnerable to data source name injection. The database name for generating and inserting data into a database does not properly sanitize user input which can lead to arbitrary file reads.\"","aliases":["CVE-2022-3023"],"modified":"2026-09-10T03:49:46.994032003Z","published":"2022-11-04T19:01:17Z","database_specific":{"github_reviewed_at":"2022-11-04T20:48:44Z","nvd_published_at":"2022-11-04T12:15:00Z","cwe_ids":["CWE-134"],"severity":"CRITICAL","github_reviewed":true},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-3023"},{"type":"WEB","url":"https://github.com/pingcap/tidb/commit/d0376379d615cc8f263a0b17c031ce403c8dcbfb"},{"type":"WEB","url":"https://advisory.dw1.io/45"},{"type":"PACKAGE","url":"https://github.com/pingcap/tidb"},{"type":"WEB","url":"https://huntr.dev/bounties/120f1346-e958-49d0-b66c-0f889a469540"}],"affected":[{"package":{"name":"github.com/pingcap/tidb","ecosystem":"Go","purl":"pkg:golang/github.com/pingcap/tidb"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"6.1.2"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/11/GHSA-7fxj-fr3v-r9gj/GHSA-7fxj-fr3v-r9gj.json"}},{"package":{"name":"github.com/pingcap/tidb","ecosystem":"Go","purl":"pkg:golang/github.com/pingcap/tidb"},"ranges":[{"type":"SEMVER","events":[{"introduced":"6.2.0"},{"last_affected":"6.4.0-alpha1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/11/GHSA-7fxj-fr3v-r9gj/GHSA-7fxj-fr3v-r9gj.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}