CVE-2025-47907: Golang Package Vulnerability Leading to Incorrect Results from Rows.Scan
Summary
CVE-2025-47907: Incorrect results returned from Rows.Scan in database/sql. Affects golang across 2 version ranges.
< 1.23.12
>= 1.24.0, < 1.24.6
Fixed in 1.23.12 or 1.24.6, depending on the release line you run. How to fix ↓
Also tracked for
- golang-1.15 · Debian:11
- stdlib · Go
- stdlib · Go
The same CVE-2025-47907 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Golang package, maintained by Bitnami, is a widely used programming language that facilitates the development of efficient and reliable software. It offers robust features for building web applications, data processing, and concurrent programming. However, it is susceptible to a critical vulnerability that can lead to unexpected results during database operations, particularly when handling concurrent queries.
Vulnerability Detail
This vulnerability arises when a query is cancelled during the execution of the Scan method on the returned Rows. If multiple queries are executed in parallel, cancelling one can lead to a race condition, resulting in the Scan method returning incorrect results from another query or an error. This can severely impact the integrity of data processing and application functionality, making it crucial to address.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 1.23.121.23.12 -
>= 1.24.0, < 1.24.61.24.6
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, avoid cancelling queries while the Scan method is in execution. Implementing proper synchronization mechanisms can help manage concurrent queries more effectively, reducing the risk of race conditions.
Conclusion
The CVE-2025-47907 vulnerability in the Golang package poses significant risks to applications that rely on concurrent database queries. It is essential to update to the fixed versions to ensure data integrity and application reliability. Implementing workarounds can provide temporary relief, but a permanent fix through updates is strongly recommended.
See every vulnerability recorded for golang →
FAQ
CVE-2025-47907 is a vulnerability in the Golang package that can lead to incorrect results when cancelling queries during the execution of the Scan method.
This vulnerability can cause your application to return unexpected results or errors when handling database queries, potentially compromising data integrity.
The vulnerability affects all versions prior to 1.23.12 and 1.24.6. It is recommended to upgrade to these patched versions.
Yes, you can use Vulert, which monitors open-source vulnerabilities in your software. You can check your application without signing up by using the Vulert playground.
If an immediate update is not possible, implement synchronization mechanisms to manage concurrent queries and avoid cancelling them during execution.
References
Related vulnerabilities
Recent vulnerabilities recorded for golang.