{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2021-31158","published":"2021-05-19T19:15:08.420000Z","last_modified":"2026-06-17T03:51:21.197000Z","status":"Modified","cvss":{"version":"3.1","score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","source":"nvd@nist.gov","primary":true},"auth":true,"cwes":["CWE-863"],"cpes":[{"criteria":"cpe:2.3:a:couchbase:couchbase_server:*:*:*:*:*:*:*:*","part":"a","vendor":"couchbase","product":"couchbase_server","version_start_including":"6.5.0","version_end_excluding":"6.6.2"}],"cpes_truncated":false,"vendors":["couchbase"],"products":["couchbase/couchbase_server"],"epss":{"score":0.00704,"percentile":0.54596,"date":"2026-12-02","model_version":"v2026.06.15"},"cat":"app","platform":"multi","eol":false,"packages":[],"severity":"medium","priority_score":39,"links":{"html_es":"/es/cve/CVE-2021-31158/","html_en":"/en/cve/CVE-2021-31158/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-31158","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-31158"},"untrusted":{"vendor_name":"Couchbase","product_name":"Couchbase Server","desc_en":"In the Query Engine in Couchbase Server 6.5.x and 6.6.x through 6.6.1, Common Table Expression queries were not correctly checking the user's permissions, allowing read-access to resources beyond what those users were explicitly allowed to access.","affected":[],"references":[{"url":"https://docs.couchbase.com/server/current/release-notes/relnotes.html","tags":["Release Notes","Vendor Advisory"]},{"url":"https://www.couchbase.com/resources/security#SecurityAlerts","tags":["Vendor Advisory"]}]}}