Weaviate 修复 Google 模块凭证泄露漏洞

Weaviate v1.39.3 修复了 Weaviate 的 Google 支持模块中存在的一个高危凭证泄露漏洞:未经校验的端点设置可被用于将出站请求连同运营方的 Google 凭证一并重定向到任意主机。目前已向 MITRE 申请 CVE,尚待分配;CVE ID 下发后,我们将更新本文。
根据我们的安全政策,在 Weaviate Cloud 中运行的 Weaviate 客户,以及 AWS、Azure 和 GCP 上的 Marketplace 客户已无缝完成补丁修复。我们的 Weaviate Enterprise Support 客户已在禁运状态下收到提前通知,我们的客户对接团队正与 Weaviate Dedicated 客户协作,在适当情况下安排版本升级。
Weaviate 的 Google 支持模块(text2vec-google、multi2vec-google 和 generative-google)允许通过 apiEndpoint 配置值来设置出站 Vertex AI 和 Gemini 请求所用的主机。该值未经校验就被直接写入请求 URL 的主机部分,而无论请求被发往何处,运营方配置的 Google 凭证都会作为 bearer token 附加到该请求上。因此,能够影响 apiEndpoint 的用户便可使 Weaviate 将该凭证投递到其自行选定的主机。
设置该值有两条途径:
第二条途径是两者中更严重的一条,也是给出这一严重性评级的主要原因。
所泄露的凭据取决于部署以何种方式向 Google 进行身份认证。如果配置的是静态 API key,泄露的就是该 key。如果启用了 USE_GOOGLE_AUTH,则泄露的是一个有效的 OAuth 访问令牌,其作用域为 cloud-platform,范围之广足以访问底层服务账号所能使用的大部分 Google Cloud API。这正是官方文档中记载的、使用 Google Cloud 应用默认凭据运行 Vertex AI 向量化的方式,也是使用 Workload Identity 的 GKE 部署的常见配置。
这条代码路径与早期版本中添加的基础 URL 校验是相互独立的。那项工作加固了大量其他模型提供商的端点字段,但那些字段名为 baseURL;而 Google 各模块的字段名为 apiEndpoint,因此未被覆盖。相关的拨号时防护也是通过 MODULES_VALIDATE_BASE_URL 选择性启用的,而且只拦截回环地址、私有地址和链路本地地址,因此无法阻止凭据被发送到公网上由攻击者控制的主机。
该修复将端点校验扩展到全部三个 Google 模块中的 apiEndpoint 字段,覆盖配置校验层和 GraphQL 查询参数层。
该漏洞的 CVSS 评分为高危(7.1)。
受影响的 Weaviate 版本为 < v1.39.3。我们建议受影响的用户将 Weaviate 安装升级至 v1.39.3 或更高版本,以彻底修复该漏洞。在完成升级之前,可以通过从 "enabled_modules" 标志中移除 text2vec-google、multi2vec-google 和 generative-google 来禁用受影响的模块。如果确实需要使用这些模块,我们建议对配置为使用这些模块的集合限制 schema 写入和查询访问权限,并在工作负载允许的范围内尽可能收窄用于 Vertex AI 的服务账号权限范围,而不是依赖宽泛的 cloud-platform 范围。
我们没有任何迹象表明该漏洞已被利用。
该漏洞由独立安全研究员 Syed Anas Mohiuddin 发现并报告,他通过我们的漏洞披露计划(Vulnerability Disclosure Program)通知了我们。我们感谢他提交了详实细致的报告,也感谢他在验证和修复过程中与我们的配合。
如果你认为自己发现了安全漏洞,请访问我们的 Security Report 页面,了解如何向我们提交报告。Weaviate 会与你联系以确认收到报告,并就后续步骤提供建议。我们请求研究人员在漏洞被修复并公布之前不要公开披露,除非你已收到 Weaviate 安全团队的回复表示可以这样做。
欢迎查看快速入门(Quickstart)教程,或注册一个免费的 Weaviate Cloud 账号。
译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。
查看英文原文(Weaviate security release - High severity fix for credential disclosure in the Google modules)
Intro
Weaviate v1.39.3 includes a fix for a high severity credential disclosure vulnerability in Weaviate's Google-backed modules, where an unvalidated endpoint setting could be used to redirect an outbound request, and the operator's Google credential with it, to an arbitrary host. 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.
Credential disclosure via unvalidated apiEndpoint in the Google modules (CVE pending assignment)
Weaviate's Google-backed modules (text2vec-google, multi2vec-google and generative-google) allow the host used for outbound Vertex AI and Gemini requests to be set through an apiEndpoint configuration value. That value was written directly into the host portion of the request URL without validation, and the operator's configured Google credential was attached to the request as a bearer token regardless of where the request was being sent. A user who can influence apiEndpoint could therefore cause Weaviate to deliver that credential to a host of their choosing.
There were two paths to setting the value:
- Through collection configuration. Setting
moduleConfig.text2vec-google.apiEndpoint(or the equivalent for the other two modules) when creating or updating a collection. Validation at this layer checked only that a project ID was present; the endpoint string itself was never checked. This path requires schema-write privileges. - Through a GraphQL query parameter.
generative-googleacceptedapiEndpointas an inline parameter on a generative query, and the per-query value overrode the collection default. This path requires only ordinary read access to a collection already configured to usegenerative-google, with no schema-write privilege and no change to stored configuration.
The second path is the more serious of the two, and is the main reason for the severity rating.
The credential exposed depends on how the deployment authenticates to Google. Where a static API key is configured, that key is disclosed. Where USE_GOOGLE_AUTH is enabled, the disclosed value is a live OAuth access token scoped to cloud-platform, which is broad enough to reach most Google Cloud APIs available to the underlying service account. This is the documented way to run Vertex AI vectorization using Google Cloud Application Default Credentials, and the usual arrangement for GKE deployments using Workload Identity.
This is a distinct code path from the base URL validation added in earlier releases. That work hardened the endpoint fields of a large number of other model providers, but those fields are named baseURL; the Google modules' field is named apiEndpoint and was not covered. The related dial-time protection is also opt-in via MODULES_VALIDATE_BASE_URL and blocks only loopback, private and link-local addresses, so it does not prevent a credential being sent to an attacker-controlled host on the public internet.
The fix extends endpoint validation to the apiEndpoint field in all three Google modules, at both the configuration-validation layer and the GraphQL query-parameter layer.
The CVSS score for this vulnerability is High (7.1).
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, the affected modules can be disabled by removing text2vec-google, multi2vec-google and generative-google from the "enabled_modules" flag. Where the modules are required, we recommend restricting schema-write and query access to collections configured to use them, and scoping the service account used for Vertex AI as narrowly as your workload allows rather than relying on a broad cloud-platform scope.
We have no indication that this vulnerability has been exploited.
Acknowledgements
This vulnerability was discovered and reported by Syed Anas Mohiuddin, an independent security researcher, who notified us through our Vulnerability Disclosure Program. We would like to thank him for the detail and care of the report, and for working with us through validation and remediation.
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 - High severity fix for credential disclosure in the Google modules),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。