Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/couchbase/sync_gateway/db
  4. ›
  5. CVE-2019-9039

CVE-2019-9039: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

February 15, 2022 (updated April 12, 2022)

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.

References

  • docs.couchbase.com/sync-gateway/2.5/release-notes.html
  • github.com/advisories/GHSA-g622-r636-qfqh
  • github.com/couchbase/sync_gateway/commit/97adb5b496aa96aa70398018ea96da913ffd8d8c
  • nvd.nist.gov/vuln/detail/CVE-2019-9039
  • research.hisolutions.com/2019/06/n1ql-injection-in-couchbase-sync-gateway-cve-2019-9039/
  • www.couchbase.com/resources/security

Code Behaviors & Features

Detect and mitigate CVE-2019-9039 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.5

Fixed versions

  • v2.5

Solution

Upgrade to version 2.5 or above.

Impact 9.8 CRITICAL

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

go/github.com/couchbase/sync_gateway/db/CVE-2019-9039.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:02 +0000.