CVE-2025-47907 PUBLISHED

Incorrect results returned from Rows.Scan in database/sql

Assigner: Go
Reserved: 13.05.2025 Published: 07.08.2025 Updated: 07.08.2025

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.

Product Status

Vendor Go standard library
Product database/sql
Versions Default: unaffected
  • affected from 0 to 1.23.12 (excl.)
  • affected from 1.24.0 to 1.24.6 (excl.)

Credits

  • Spike Curtis from Coder

References

Problem Types

  • CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')