【高危】scram-client 安全更新(GHSA-p9jg-fcr6-3mhf)
安全情报快照 · 风险级别:高危 · CVE-2026-53712 · GHSA-p9jg-fcr6-3mhf
先看结论
scram-client存在安全风险,<= 3.2 受影响,建议升级至 3.3。
影响范围
| 生态 | 组件 | 受影响版本 | 首个修复版本 |
|---|---|---|---|
| maven | com.ongres.scram:scram-client |
<= 3.2 | 3.3 |
| maven | com.ongres.scram:scram-common |
<= 3.2 | 3.3 |
处置建议
优先将 com.ongres.scram:scram-client 升级至 3.3 或更高版本;升级前请结合业务依赖完成兼容性验证。
上游技术详情(原文)
Summary
A flaw in com.ongres.scram:scram-client allows an attacker capable of performing a TLS man-in-the-middle (MITM) attack to silently downgrade a connection from SCRAM-SHA-256-PLUS (with channel binding) to standard SCRAM-SHA-256 (without channel binding), bypassing strict client-side enforcement policies.
Component Breakdown
This occurs due to a two-part failure in TlsServerEndpoint when a server presents an X.509 certificate using a modern signature algorithm that lacks traditional WITH naming structures (such as Ed25519 or post-quantum algorithms):
- The internal hash derivation method fails to parse the algorithm name, swallows the resulting
NoSuchAlgorithmException, and silently returns an empty byte array via the deprecatedgetChannelBindingData()` API. - The client builder mistakenly interprets this empty byte array as an environmental absence of channel binding data rather than a cryptographic failure, falling back to non-channel-bound authentication.
Impact & Scope
This issue only impacts deployments where the downstream application layer explicitly enforces strict channel binding enforcement (e.g., channelBinding=require in pgJDBC).
Drivers operating under a "prefer" or "allow" policy (used by default) are structurally insulated from an unhandled exception since a fallback to standard SCRAM is within their expected configuration.
Remediation
Update your project configuration to pull in version 3.3 or later of the SCRAM library, which introduces strict exception propagation and explicit policy controls.
If you are interacting with the ScramClient builder API directly (e.g., writing a custom driver or database extension):
- Migrate Deprecated APIs: Stop using
TlsServerEndpoint.getChannelBindingData(). Transition immediately toTlsServerEndpoint.getChannelBindingHash(), which correctly propagatesNoSuchAlgorithmExceptionup the stack. - Adopt Explicit Policies: Leverage the newly introduced
ChannelBindingPolicyAPI during client construction. Do not rely on implicit parameter presence to dictate your security boundaries.
ScramClient client = ScramClient.builder()
.advertisedMechanisms(serverMechanisms)
.username(user)
.password(pass)
// Explicitly enforce strict boundaries if needed.
.channelBindingPolicy(ChannelBindingPolicy.REQUIRE)
.channelBinding(TlsServerEndpoint.TLS_SERVER_END_POINT, certHash)
.build();
来源与许可
- GitHub Advisory GHSA-p9jg-fcr6-3mhf
- https://github.com/ongres/scram/security/advisories/GHSA-p9jg-fcr6-3mhf
本页自动同步 GitHub Advisory Database 的公开数据,并保留上游原文供核验;不宣称原创分析。数据许可:CC-BY-4.0。
评论
登录 后参与讨论。
还没有评论,来说两句。