Home / Couchbase / Sync Gateway / CVE-2019-9039
CVE-2019-9039: is it exploited, and which versions of Couchbase Sync Gateway are affected and fixed?
CVE-2019-9039 is a SQL injection vulnerability in Couchbase Sync Gateway. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 10:08 UTC). Affected: github.com/couchbase/sync_gateway before 2.5.0 (GitHub advisory GHSA-g622-r636-qfqh). Fixed in 2.5.0 (GitHub advisory GHSA-g622-r636-qfqh). Severity: Critical (9.8, CVSS 3.0, from NVD).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 10:08 UTC, CVE record November 19, 2026, 07:17 UTC and NVD November 19, 2026, 08:21 UTC.
What is CVE-2019-9039?
In Couchbase Sync Gateway 2.1.2, an attacker with access to the Sync Gateway’s public REST API was able to issue additional N1QL statements and extract sensitive data or call arbitrary N1QL functions through the parameters "startkey" and "endkey" on the "_all_docs" endpoint. By issuing nested queries with CPU-intensive operations they may have been able to cause increased resource usage and denial of service conditions. The _all_docs endpoint is not required for Couchbase Mobile replication and external access to this REST endpoint has been blocked to mitigate this issue. This issue has been fixed in versions 2.5.0 and 2.1.3.
From the CVE record by mitre, last updated August 4, 2024, 21:38 UTC.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| Go | github.com/couchbase/sync_gateway | < 2.5.0 | 2.5.0 | GHSA-g622-r636-qfqh |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated May 17, 2021. Summary: SQL Injection in Couchbase Sync Gateway.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| couchbase | sync gateway | 2.1.2 | application |
NVD analysis (status Modified), last modified June 17, 2026, 02:42 UTC.
How severe is CVE-2019-9039?
| Score | Version | Vector | Source |
|---|---|---|---|
| Critical 9.8 | CVSS 3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NVD |
| High 7.5 | CVSS 2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2019-9039 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 2.74% probability of exploitation activity in the next 30 days, percentile 86.6 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
Where are the vendor advisories and references?
- https://docs.couchbase.com/sync-gateway/2.5/release-notes.html x_refsource_CONFIRM
- https://research.hisolutions.com/2019/06/n1ql-injection-in-couchbase-sync-gateway-cve-2019-9039/ x_refsource_MISC
- https://www.couchbase.com/resources/security#SecurityAlerts x_refsource_MISC
When was it published, and where is the official record?
- Reserved
- February 23, 2019
- Published
- June 26, 2019, 18:55 UTC
- CVE record updated
- August 4, 2024, 21:38 UTC by mitre
- NVD
- Modified, last modified June 17, 2026, 02:42 UTC
- Last checked
- CVE list November 19, 2026, 07:17 UTC; NVD November 19, 2026, 08:21 UTC; KEV December 3, 2026, 10:08 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect Sync Gateway?
- Jul 29, 2025CVE-2025-52490 Couchbase Sync Gateway: sensitive data sent in clear text
- Jun 10, 2022CVE-2022-32563 Couchbase Sync Gateway: improper certificate validation
- Dec 7, 2021CVE-2021-43963 Couchbase Sync Gateway: information disclosure
- Jun 8, 2020CVE-2020-9041 Couchbase Server: resource not released
Questions about CVE-2019-9039
Is CVE-2019-9039 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 10:08 UTC. FIRST's EPSS gives it a 2.74% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of Couchbase Sync Gateway are affected by CVE-2019-9039?
github.com/couchbase/sync_gateway before 2.5.0, per the GitHub advisory GHSA-g622-r636-qfqh. The tables above give every range the sources list.
Which version fixes CVE-2019-9039?
2.5.0, per the GitHub advisory GHSA-g622-r636-qfqh. Check the vendor's advisory before you rely on it.
How severe is CVE-2019-9039?
Critical (9.8, CVSS 3.0, from NVD). The severity table above shows each score with its source.
Where is the official record of CVE-2019-9039?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.