Weaviate 安全更新修复 nearObject 向量泄露

随着 Weaviate v1.39.3 及 > 的发布,Weaviate 的 GraphQL nearObject 搜索算子中一个中危授权漏洞已得到修复,该漏洞允许用户读取其无权读取的集合中某个对象的向量。我们已向 MITRE 申请 CVE 编号,目前正在等待分配;编号发布后,我们将更新本文。
按照我们的安全政策,在 Weaviate Cloud 中运行的 Weaviate 客户,以及 AWS、Azure 和 GCP 上的 Marketplace 客户均已完成无缝修补。我们的 Weaviate 企业支持客户已在保密期(embargo)内提前收到通知,我们的客户对接团队正在与 Weaviate Dedicated 客户协作,在适当情况下安排版本升级。
nearObject 搜索会接收一个指向现有对象的 beacon,加载该对象的向量,并将其用作搜索向量。Weaviate 会对被搜索的集合进行授权,但不会对 beacon 中指定的集合进行授权。当两者不一致时,即使调用方对该 beacon 目标没有读取权限,其向量仍会被加载并使用。
结果并非直接读取受保护对象。调用方在响应中从来看不到该对象、它的属性或它的向量。调用方实际拿到的是受保护向量与搜索返回的每个对象之间的距离,而这些距离足以重建出受保护向量。通过向自己可控的集合中填入精心挑选的探测向量,再针对该集合运行一次 nearObject 搜索,并用一个指向自己不可控集合的信标(beacon),调用方就能以很高的精度还原受保护向量。报告者演示了仅用 8 个探测对象,就把一个归一化的四维向量还原到 5e-9 的误差以内。
要实施该攻击,用户需要:
用户不需要对目标集合拥有读取权限。Weaviate 对直接读取受保护对象的请求会正确返回 403,而同一账号却能通过搜索路径取回同一个向量。
这会影响那些依赖 RBAC 在共享集群内隔离集合的部署,例如多个团队或多个应用共用一个 Weaviate 实例、且各自只能读取自己集合的场景。至于所有具备查询权限的用户本就已被信任可访问全部集合数据的部署,则不会受到实质影响。
修复方案在加载信标目标的向量之前先对其进行授权校验,位置在共享的向量查询处,而不是在 GraphQL resolver 中,这样所有使用该查询的 API 入口都会被同一项检查覆盖。
该漏洞的 CVSS 评分为中危。
受影响的 Weaviate 版本为 < v1.39.3。我们建议受影响的用户将 Weaviate 安装更新至 v1.39.3 或更高版本,以彻底修复该漏洞。在完成升级之前,我们建议检查哪些角色在所有集合(collection)上持有 read_collections 权限,因为无法查看某个集合定义的用户无法通过 GraphQL 查询其字段,并建议将该权限收窄至各角色实际需要的集合范围。同时,检查哪些角色在任意集合上持有 create_data 权限也值得一做,因为该攻击需要有一处位置来放置探测向量。
我们没有任何迹象表明该漏洞已被利用。
该漏洞由 Civitasmass 发现并报告,他们通过我们的漏洞披露计划(Vulnerability Disclosure Program)通知了我们。报告包含一个完整可用的复现程序以及精确的根因分析,使我们得以快速确认并修复该问题。我们感谢他们负责任地报告了此事。
如果你认为自己发现了安全漏洞,请前往我们的安全报告页面,了解如何向我们提交报告。Weaviate 将与你联系以确认收到报告,并告知后续步骤。我们要求研究人员在漏洞被修复并公布之前不要公开披露,除非你已收到 Weaviate 安全团队的回复,表示你可以这样做。
请查看快速入门教程,或注册一个免费的 Weaviate Cloud 账户。
译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。
查看英文原文(Weaviate security release - Medium severity fix for a cross-collection vector disclosure in nearObject (CVE pending assignment))
Intro
With the release of Weaviate v1.39.3 and >, there is a fix for a medium severity authorization vulnerability in Weaviate's GraphQL nearObject search operator, where a user could read the vector of an object in a collection they do not have permission to read. A CVE has been requested from MITRE and is pending assignment; we will update this post with the CVE ID once it has been issued.
As per our security policy, Weaviate customers running in Weaviate Cloud, and Marketplace customers on AWS, Azure and GCP have been patched seamlessly. Our Weaviate Enterprise Support customers have received early notification under embargo, and our customer-facing teams are working with Weaviate Dedicated customers to organize version upgrades where appropriate.
Cross-collection vector disclosure via nearObject (CVE pending assignment)
A nearObject search takes a beacon naming an existing object, loads that object's vector, and uses it as the search vector. Weaviate authorized the collection being searched, but did not authorize the collection named in the beacon. Where the two differed, the vector of the beacon target was loaded and used even if the caller had no read permission on it.
The result is not a direct read of the protected object. The caller never sees the object, its properties or its vector in the response. What the caller does receive is the distance between the protected vector and each object returned by the search, and those distances are enough to reconstruct the protected vector. By populating a collection they do control with chosen probe vectors and then running a nearObject search against that collection with a beacon pointing into a collection they do not control, a caller can recover the protected vector to a high degree of precision. The reporter demonstrated recovery of a normalized four-dimensional vector to within 5e-9 using eight probe objects.
To carry out the attack, a user needs:
- The name of the target collection and the UUID of a specific object within it. These are not guessable, but they are often known, for example where an application stores cross-references between collections.
- Permission to read collection definitions, which GraphQL requires in order to expose the collection's fields.
- Permission to create and read data in some other collection, used to hold the probe vectors.
The user does not need read permission on the target collection. Weaviate correctly returns 403 for a direct read of the protected object while the same account retrieves the same vector through the search path.
This affects deployments that rely on RBAC to separate collections within a shared cluster, for instance where several teams or applications share one Weaviate instance and each has read access only to its own collection. Deployments where every user with query access is already trusted with all collection data are not meaningfully affected.
The fix authorizes the beacon target before its vector is loaded, at the shared vector lookup rather than in the GraphQL resolver, so that every API surface using that lookup is covered by the same check.
The CVSS score for this vulnerability is Medium.
Impacted versions of Weaviate are < v1.39.3. We recommend that impacted users update their Weaviate installations to v1.39.3 or later to fully address the vulnerability. Until you can upgrade, we recommend reviewing which roles hold read_collections across all collections, since a user who cannot see a collection's definition cannot query its fields through GraphQL, and narrowing that permission to the collections each role legitimately needs. Reviewing which roles hold create_data on any collection is also worthwhile, as the attack requires somewhere to place probe vectors.
We have no indication that this vulnerability has been exploited.
Acknowledgements
This vulnerability was discovered and reported by Civitasmass, who notified us through our Vulnerability Disclosure Program. The report included a complete working reproducer and a precise root cause analysis, which allowed us to confirm and fix the issue quickly. We would like to thank them for reporting it responsibly.
Reporting Security Issues
If you think you have found a security vulnerability, please go to our Security Report page to learn how to send us a report. Weaviate will contact you to acknowledge your report, and advise on next steps. We ask that researchers do not disclose vulnerabilities publicly until they have been fixed and announced, unless you have received a response from the Weaviate security team that you can do so.
Ready to start building?
Check out the Quickstart tutorial, or sign up for a free Weaviate Cloud account.
正文保留英文原文,标题与摘要由机器翻译。
原文发布于 Weaviate Blog(Weaviate security release - Medium severity fix for a cross-collection vector disclosure in nearObject (CVE pending assignment)),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。