Vulnerability · Published Aug 7, 2025 · Assigned by Go

CVE-2025-47907Incorrect results returned from Rows.Scan in database/sql

High 7.0

In plain English

A high-severity security flaw in database/sql from Go standard library. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 35% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.0High
Exploit odds (30 days)0.4%top 64.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:10golang-docs1.24.6-1.el10_0.alma.1ALSA-2025:13941
AlmaLinux:10golang-misc1.24.6-1.el10_0.alma.1ALSA-2025:13941
AlmaLinux:10golang-src1.24.6-1.el10_0.alma.1ALSA-2025:13941
AlmaLinux:10golang-tests1.24.6-1.el10_0.alma.1ALSA-2025:13941
AlmaLinux:10podman7:5.6.0-5.el10_1ALSA-2025:20983
AlmaLinux:9podman6:5.6.0-6.el9_7ALSA-2025:20909
AlmaLinux:10podman-docker7:5.6.0-5.el10_1ALSA-2025:20983
AlmaLinux:9podman-docker6:5.6.0-6.el9_7ALSA-2025:20909
AlmaLinux:9podman-plugins6:5.6.0-6.el9_7ALSA-2025:20909
AlmaLinux:10podman-remote7:5.6.0-5.el10_1ALSA-2025:20983
AlmaLinux:9podman-remote6:5.6.0-6.el9_7ALSA-2025:20909
AlmaLinux:10podman-tests7:5.6.0-5.el10_1ALSA-2025:20983
AlmaLinux:9podman-tests6:5.6.0-6.el9_7ALSA-2025:20909
Alpine:v3.22go1.24.6-r0ALPINE-CVE-2025-47907
Alpine:v3.23go1.24.6-r0ALPINE-CVE-2025-47907
Alpine:v3.24go1.24.6-r0ALPINE-CVE-2025-47907
Debian:12golang-1.19no fix listedDEBIAN-CVE-2025-47907
Debian:13golang-1.24no fix listedDEBIAN-CVE-2025-47907
Gostdlib1.23.12, 1.24.6GO-2025-3849
Ubuntu:22.04:LTSgolang-1.17no fix listedUBUNTU-CVE-2025-47907
Ubuntu:22.04:LTSgolang-1.18no fix listedUBUNTU-CVE-2025-47907
Ubuntu:22.04:LTSgolang-1.20no fix listedUBUNTU-CVE-2025-47907
Ubuntu:22.04:LTSgolang-1.21no fix listedUBUNTU-CVE-2025-47907
Ubuntu:24.04:LTSgolang-1.21no fix listedUBUNTU-CVE-2025-47907
Ubuntu:22.04:LTSgolang-1.22no fix listedUBUNTU-CVE-2025-47907
Ubuntu:24.04:LTSgolang-1.22no fix listedUBUNTU-CVE-2025-47907
Ubuntu:22.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-47907
Ubuntu:24.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-47907
Ubuntu:25.10golang-1.23no fix listedUBUNTU-CVE-2025-47907
Ubuntu:26.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-47907
Ubuntu:22.04:LTSgolang-1.24no fix listedUBUNTU-CVE-2025-47907
Ubuntu:24.04:LTSgolang-1.24no fix listedUBUNTU-CVE-2025-47907
Ubuntu:25.10golang-1.24no fix listedUBUNTU-CVE-2025-47907
Ubuntu:22.04:LTSgolang-1.25no fix listedUBUNTU-CVE-2025-47907
Ubuntu:24.04:LTSgolang-1.25no fix listedUBUNTU-CVE-2025-47907

Affected products (as reported)

VendorProductVersions
Go standard library database/sql 0 – before 1.23.121.24.0 – before 1.24.6

References