CVE-2019-9039: SQL Injection

Published Jun 26, 2019
·
Updated

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 "alldocs" 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 alldocs 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.

Other sources

The Couchbase Sync Gateway 2.1.2 in combination with a Couchbase Server is affected by a previously undisclosed N1QL-injection vulnerability in the REST API. An attacker with access to the public REST API can insert additional N1QL statements through the parameters ?startkey? and ?endkey? of the ?alldocs? endpoint.

Affected Software

2 affected componentsFixes available
go/github.com/couchbase/sync_gateway<2.5.0
2.5.0
Couchbase Sync Gateway=2.1.2

Event History

Jun 26, 2019
CVE Published
via MITRE·06:55 PM
Data Sourced
via MITRE·06:55 PM
Description
Feb 15, 2022
Advisory Published
01:57 AM

Frequently Asked Questions

1

What is CVE-2019-9039?

CVE-2019-9039 is a vulnerability in Couchbase Sync Gateway 2.1.2 that allows an attacker to issue additional N1QL statements and extract sensitive data or call arbitrary N1QL functions.

2

How does CVE-2019-9039 affect Couchbase Sync Gateway?

CVE-2019-9039 affects Couchbase Sync Gateway 2.1.2 by allowing an attacker with access to the Sync Gateway's public REST API to issue additional N1QL statements and extract sensitive data or call arbitrary N1QL functions.

3

What is the severity of CVE-2019-9039?

CVE-2019-9039 has a severity rating of 9.8 (Critical).

4

How can I fix CVE-2019-9039?

To fix CVE-2019-9039, upgrade to Couchbase Sync Gateway version 2.5.0 or later.

5

Where can I find more information about CVE-2019-9039?

More information about CVE-2019-9039 can be found at the following references: [Link 1](https://nvd.nist.gov/vuln/detail/CVE-2019-9039), [Link 2](https://github.com/couchbase/sync_gateway/commit/97adb5b496aa96aa70398018ea96da913ffd8d8c), [Link 3](https://docs.couchbase.com/sync-gateway/2.5/release-notes.html).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203