【高危】v2:服务端请求伪造风险(GHSA-jxpm-75mh-9fp7)
安全情报快照 · 风险级别:高危 · CVSS:7.5 · CVE-2026-50151 · GHSA-jxpm-75mh-9fp7
先看结论
v2存在服务端请求伪造风险,< 2.6.1 受影响,建议升级至 2.6.1。
影响范围
| 生态 | 组件 | 受影响版本 | 首个修复版本 |
|---|---|---|---|
| go | oras.land/oras-go/v2 |
< 2.6.1 | 2.6.1 |
处置建议
优先将 oras.land/oras-go/v2 升级至 2.6.1 或更高版本;升级前请结合业务依赖完成兼容性验证。
上游技术详情(原文)
Summary
oras-go follows a registry-controlled Location header during the monolithic blob upload flow and reuses the Authorization header from the initial POST request for the subsequent PUT request. If a malicious registry returns a cross-host Location, oras-go can send the caller's credentials to an attacker-controlled endpoint.
Affected Versions
tested: v2.6.0 (commit 03243809936cce826494b5506f724c6dc11115b1, as-of 2026-01-24)
range: unknown; likely affects earlier v2.x releases that include the same upload flow
Impact
Credential leak to an attacker-controlled endpoint and client-side ssrf to a cross-host target.
Affected Component
registry/remote/repository.go:878-916(blobStore.completePushAfterInitialPost)
Reproduction
Attachments include poc.zip with a local-only harness (no real registry required). It runs a fake registry server that returns a cross-host Location and a second server that records whether it received Authorization.
unzip -q -o poc.zip -d /tmp/poc
cd /tmp/poc/poc-F-ORAS-LOCATION-UPLOAD-001
make canonical
make control
Recommended Fix
- validate
Locationbefore uploading (scheme + hostname + effective port) against the original request, or require an explicit opt-in allowlist for cross-host upload urls - never forward
Authorizationwhen the upload target changes host or scheme
references
- security policy: https://github.com/oras-project/oras-go/security/policy
- vulnerable code:
registry/remote/repository.go(seeblobStore.completePushAfterInitialPost)
来源与许可
- GitHub Advisory GHSA-jxpm-75mh-9fp7
- https://github.com/oras-project/oras-go/security/advisories/GHSA-jxpm-75mh-9fp7
- https://github.com/oras-project/oras-go/pull/1152
- https://github.com/oras-project/oras-go/commit/4683c46ef078091544f5f55fd25102f002806991
- https://github.com/oras-project/oras-go/releases/tag/v2.6.1
本页自动同步 GitHub Advisory Database 的公开数据,并保留上游原文供核验;不宣称原创分析。数据许可:CC-BY-4.0。
评论
登录 后参与讨论。
还没有评论,来说两句。