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

High 7.0 Published Updated

A race condition in Go's database/sql package allows attackers to retrieve unexpected data from parallel queries by cancelling contexts during scan operations.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-47907?

CVE-2025-47907 is a high-severity vulnerability in Golang Go, published on 7 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

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.

Weakness: CWE-362

Which versions are affected by CVE-2025-47907?

2 open source packages ship an affected version, including golang and stdlib. It affects 1 product.

PackageAffectedFixed in
golang BitnamiAll versions1.23.12, 1.24.6
stdlib GoAll versions1.23.12, 1.24.6
Linux distribution packages (38)
delve Red Hat:rhel_aus:8.2::appstreamAll versions0:1.3.2-3.module+el8.2.0+5581+896cb53e
delve-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:1.3.2-3.module+el8.2.0+5581+896cb53e
delve-debugsource Red Hat:rhel_aus:8.2::appstreamAll versions0:1.3.2-3.module+el8.2.0+5581+896cb53e
go-toolset Red Hat:rhel_aus:8.2::appstreamAll versions0:1.13.15-1.module+el8.2.0+7662+fa98b974
golang Red Hat:rhel_aus:8.2::appstreamAll versions0:1.13.15-11.module+el8.2.0+23627+d458f451
golang-bin Red Hat:rhel_aus:8.2::appstreamAll versions0:1.13.15-11.module+el8.2.0+23627+d458f451
golang-docs Red Hat:rhel_aus:8.2::appstreamAll versions0:1.13.15-11.module+el8.2.0+23627+d458f451
golang-misc Red Hat:rhel_aus:8.2::appstreamAll versions0:1.13.15-11.module+el8.2.0+23627+d458f451
golang-race Red Hat:rhel_aus:8.2::appstreamAll versions0:1.13.15-11.module+el8.2.0+23627+d458f451
golang-src Red Hat:rhel_aus:8.2::appstreamAll versions0:1.13.15-11.module+el8.2.0+23627+d458f451
golang-tests Red Hat:rhel_aus:8.2::appstreamAll versions0:1.13.15-11.module+el8.2.0+23627+d458f451
delve Red Hat:rhel_aus:8.4::appstreamAll versions0:1.5.0-2.module+el8.4.0+8864+58b0fcdb
delve-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:1.5.0-2.module+el8.4.0+8864+58b0fcdb
delve-debugsource Red Hat:rhel_aus:8.4::appstreamAll versions0:1.5.0-2.module+el8.4.0+8864+58b0fcdb
go-toolset Red Hat:rhel_aus:8.4::appstreamAll versions0:1.15.14-3.module+el8.4.0+22765+91da4d3f
golang Red Hat:rhel_aus:8.4::appstreamAll versions0:1.15.14-16.module+el8.4.0+23635+6912b903
golang-bin Red Hat:rhel_aus:8.4::appstreamAll versions0:1.15.14-16.module+el8.4.0+23635+6912b903
golang-docs Red Hat:rhel_aus:8.4::appstreamAll versions0:1.15.14-16.module+el8.4.0+23635+6912b903
golang-misc Red Hat:rhel_aus:8.4::appstreamAll versions0:1.15.14-16.module+el8.4.0+23635+6912b903
golang-race Red Hat:rhel_aus:8.4::appstreamAll versions0:1.15.14-16.module+el8.4.0+23635+6912b903
golang-src Red Hat:rhel_aus:8.4::appstreamAll versions0:1.15.14-16.module+el8.4.0+23635+6912b903
golang-tests Red Hat:rhel_aus:8.4::appstreamAll versions0:1.15.14-16.module+el8.4.0+23635+6912b903
delve Red Hat:rhel_aus:8.6::appstreamAll versions0:1.7.2-1.module+el8.6.0+12972+ebab5911
delve-debuginfo Red Hat:rhel_aus:8.6::appstreamAll versions0:1.7.2-1.module+el8.6.0+12972+ebab5911
delve-debugsource Red Hat:rhel_aus:8.6::appstreamAll versions0:1.7.2-1.module+el8.6.0+12972+ebab5911
go-toolset Red Hat:rhel_aus:8.6::appstreamAll versions0:1.17.13-2.module+el8.6.0+22782+bd95fb4c
golang Red Hat:rhel_aus:8.6::appstreamAll versions0:1.17.13-10.module+el8.6.0+23632+877f48ed
golang-bin Red Hat:rhel_aus:8.6::appstreamAll versions0:1.17.13-10.module+el8.6.0+23632+877f48ed
golang-docs Red Hat:rhel_aus:8.6::appstreamAll versions0:1.17.13-10.module+el8.6.0+23632+877f48ed
golang-misc Red Hat:rhel_aus:8.6::appstreamAll versions0:1.17.13-10.module+el8.6.0+23632+877f48ed
golang-race Red Hat:rhel_aus:8.6::appstreamAll versions0:1.17.13-10.module+el8.6.0+23632+877f48ed
golang-src Red Hat:rhel_aus:8.6::appstreamAll versions0:1.17.13-10.module+el8.6.0+23632+877f48ed
golang-tests Red Hat:rhel_aus:8.6::appstreamAll versions0:1.17.13-10.module+el8.6.0+23632+877f48ed
delve Red Hat:rhel_e4s:8.6::appstreamAll versions0:1.7.2-1.module+el8.6.0+12972+ebab5911
delve-debuginfo Red Hat:rhel_e4s:8.6::appstreamAll versions0:1.7.2-1.module+el8.6.0+12972+ebab5911
delve-debugsource Red Hat:rhel_e4s:8.6::appstreamAll versions0:1.7.2-1.module+el8.6.0+12972+ebab5911
go-toolset Red Hat:rhel_e4s:8.6::appstreamAll versions0:1.17.13-2.module+el8.6.0+22782+bd95fb4c
golang Red Hat:rhel_e4s:8.6::appstreamAll versions0:1.17.13-10.module+el8.6.0+23632+877f48ed

Products include Golang Go.

How do I fix CVE-2025-47907?

Upgrade golang to a fixed version for your release line: 1.23.12 or 1.24.6.

Is CVE-2025-47907 being exploited?

There is no known exploitation of CVE-2025-47907 in the wild and no public exploit code.

All Golang Go vulnerabilities

Sources

Also known as AZL-66135, AZL-66138, AZL-66150, AZL-66153, BELL-CVE-2025-47907, BIT-golang-2025-47907 and 155 more.

Is CVE-2025-47907 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free