What’s Vulnerable › Vulnerabilities
CVE-2025-47907: Incorrect results returned from Rows.Scan in database/sql
- Severity: high (CVSS 7.0 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-08-07 · updated 2026-06-17
- Weakness: CWE-362
Description
Cancelling a query (e.g. by cancelling the context passed to one of the query methods) during a call to the Scan method of the returned Rows can result in unexpected results if other queries are being made in parallel. This can result in a race condition that may overwrite the expected results with those of another query, causing the call to Scan to return either unexpected results from the other query or an error.
Affected products
- Go: before 1.23.12; from 1.24.0 before 1.24.6 — fixed in 1.23.12, 1.24.6
How to fix
Upgrade to a fixed version: Go 1.23.12, 1.24.6. Check the vendor advisory for mitigations.
References
- https://go.dev/cl/693735
- https://go.dev/issue/74831
- https://groups.google.com/g/golang-announce/c/x5MKroML2yM
- https://pkg.go.dev/vuln/GO-2025-3849
- http://www.openwall.com/lists/oss-security/2025/08/06/1
Get alerted when CVE-2025-47907 or the next vulnerability affects your stack