Shibboleth SP 的 SAML 认证绕过(CVE-2026-145755)
Shibboleth SP 的 SAML 绑定混淆允许攻击者通过 ECP 端点伪造会话;已在 OpenSAML 3.3.2 和 SP 3.6.1 中修复。
TL;DR
- Shibboleth Service Provider 中的绑定混淆允许未认证的攻击者向 ECP 端点提交伪造的 SAML 断言,并以任意用户身份获得会话。Shibboleth 将该漏洞评为严重,CVE 记录给出的 CVSS v4.0 评分为 9.1。
- 链接 3.3.2 之前版本 OpenSAML C++ 的 Service Provider 会受影响。在 Windows 上,3.6.1 之前的 SP 安装程序捆绑了旧版库,而 ECP 端点默认启用。
- 没有公开的利用代码,也没有确认的在野利用。截至 2026-12-06,CVE-2026-145755 不在 CISA 的 Known Exploited Vulnerabilities 目录(版本 2026.12.04)中。
- 将 OpenSAML 更新到 3.3.2 或更高版本,然后重启 shibd。在 Windows 上,安装 SP 3.6.1。“如何修复?”给出了软件包命令和配置缓解措施。
我受影响吗?
如果以下条件全部成立,您会受影响:
- Service Provider 链接了 3.3.2 之前版本的 OpenSAML C++。在 Windows 上,3.6.1 之前的 SP 安装程序捆绑了旧版库。
- 受影响的端点可访问:会话伪造通过 SAML 2 Enhanced Client/Proxy(ECP),独立的 SOAP 变体则通过 SOAP 端点。ECP 默认启用;公告列出的 SOAP 路径包括单点注销、名称标识符管理和工件解析。
- Service Provider 信任某个身份提供者,而攻击者能够获取或重用该提供者签名的消息。签名规则仍须验证真实签名,才会将消息标记为已认证。
Shibboleth Service Provider 是科研与教育联合体使用的标准 SAML Service Provider。由 Jisc 运营的英国联合体表示,该软件是“the most prevalent Service Provider software deployed in the UK Access Management Federation and across eduGAIN”。该联合体称这是“the worst vulnerability in the Project's history”,并要求成员修复或缓解。
| 部署方式 | 受影响版本 | 修复版本 |
|---|---|---|
| Windows Service Provider | 3.6.1 之前的 SP(捆绑 3.3.2 之前的 OpenSAML) | SP 3.6.1 |
| Shibboleth RPM 仓库 | 3.3.2 之前的 libsaml13 | libsaml13 3.3.2 |
| Debian 13(trixie) | opensaml 3.3.1-2(libsaml13) | opensaml 3.3.1-2+deb13u1(libsaml13) |
| Debian 12(bookworm) | opensaml 3.2.1-3+deb12u1(libsaml12) | 截至 2026-12-06 没有修复包 |
| Debian unstable | opensaml 3.3.1-5(libsaml13) | 截至 2026-12-06 没有修复包 |
CVE 记录将该漏洞评为 CVSS v4.0 9.1 严重,CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H,提供者紧急程度为红色。记录将 3.3.2 之前的所有 OpenSAML C++ 版本列为受影响。
检查正在运行的守护进程加载的 OpenSAML 版本。启动行会列出每个库的版本:
grep -m1 'Library versions' /var/log/shibboleth/shibd.log
在 Windows 上,请在 C:\opt\shibboleth-sp\var\log\shibd.log 或应用程序事件日志中读取同一行。该行必须显示 OpenSAML-C 3.3.2 或更高版本。
在提供软件包的平台上检查软件包:
rpm -q libsaml13 # Shibboleth RPM repository
dpkg -l libsaml13 # Debian 13
port installed opensaml # macOS MacPorts
检查 ECP 处理程序是否有响应。404 通常表示该路径未暴露。Service Provider 自身的错误页面表示处理程序已配置。
curl -s -o /dev/null -w '%{http_code}\n' https://sp.example.org/Shibboleth.sso/SAML2/ECP
将该响应与“如何修复?”中的缓解检查进行比较。反向代理在两种状态下都可能返回 404,因此日志中的版本才是可靠的暴露检查。
如何修复?
将 OpenSAML C++ 更新到 3.3.2 或更高版本,然后重启 shibd 和 Web 服务器模块。在 Linux 上,仅更新 shibboleth 软件包不能修复该漏洞,因为 Service Provider 加载的是单独的 libsaml 库。
- 在 Windows 上,安装 Service Provider 3.6.1 或更高版本。该安装程序捆绑 OpenSAML 3.3.2。
- 在使用 Shibboleth RPM 仓库的主机上,运行
sudo dnf update --repo shibboleth。该更新会替换libsaml13以及由 Shibboleth 源码构建的其他软件包。 - 在 Debian 13(trixie)上,运行
sudo apt update,然后运行sudo apt install --only-upgrade libsaml13。修复包是3.3.1-2+deb13u1,它向后移植了修复。 - 在使用 MacPorts 的 macOS 上,运行
sudo port upgrade opensaml。xmltooling 和 shibboleth 端口也有更新。 - 在其他平台上,从源码构建 OpenSAML 3.3.2,或等待平台的软件包。
- 使用
sudo systemctl restart shibd重启守护进程,然后重新加载 Web 服务器模块(Apache 或 IIS)。 - 重复“我受影响吗?”中的
Library versions检查。它必须显示OpenSAML-C 3.3.2。
如果无法修复,请禁用公告列出的端点。Shibboleth 将其称为缓解措施,而不是修复。
- 如果存在
/etc/shibboleth/protocols.xml,请注释掉启用 ECP/PAOS 和 SOAP 处理程序的行。公告的 wiki 页面列出了随附的行。 - 在
/etc/shibboleth/shibboleth2.xml中,注释掉任何显式的<md:AssertionConsumerService ... Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"/>、<md:SingleLogoutService ... Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>、<md:ManageNameIDService ... Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>和<md:ArtifactResolutionService ... Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>元素。大多数较新的部署没有这些元素。 - 如果您使用 ECP 且无法修复,还请注释掉
<Rule type="SimpleSigning" errorFatal="true"/>。它可能出现在security-policy.xml或shibboleth2.xml中,并且可能出现多次。这会破坏通过 HTTP-Redirect 绑定进行的签名注销。 - 重新加载或重启 shibd 和 Web 服务器。
- 请求
/Shibboleth.sso/SAML2/ECP。Service Provider 应返回“Shibboleth handler invoked at an unconfigured location.”。
阻止 /SAML2/ECP 路径的负载均衡规则只是部分缓解。公告的 wiki 页面警告说,URL 编码技巧可以到达同一处理程序,因此比较必须在未编码的路径上进行。
根本原因是什么?
Service Provider 在没有检查请求使用哪种 SAML 绑定的情况下应用了签名规则,因此规则和消息解码器可以从同一个请求中读取两个不同的消息。
OpenSAML C++ 是 Shibboleth Service Provider 背后的库。它实现 SAML 绑定、消息解码器和验证签名的安全策略规则。SimpleSigning 规则验证 HTTP-Redirect 绑定和 HTTP-POST-SimpleSign 绑定使用的非 XML 签名。ECP 和 SOAP 解码器解析请求正文中的 XML 消息。
该规则位于 saml/binding/impl/SimpleSigningRule.cpp。在 3.3.1 中,evaluate() 根据 HTTP 方法选择分支。GET 读取原始查询字符串。其他任何方法读取消息参数并进行 base64 解码:
// cpp-opensaml 3.3.1, saml/binding/impl/SimpleSigningRule.cpp, evaluate()
const HTTPRequest* httpRequest = dynamic_cast<const HTTPRequest*>(request);
if (!request || !httpRequest) {
return false;
}
...
const char* messageParameterName = getMessageParameterName(&message);
...
string input;
const char* pch;
if (!strcmp(httpRequest->getMethod(), "GET")) {
pch = httpRequest->getQueryString();
appendParameter(*request, input, pch, messageParameterName);
appendParameter(*request, input, pch, "RelayState");
appendParameter(*request, input, pch, "SigAlg");
}
else {
XMLSize_t x;
pch = httpRequest->getParameter(messageParameterName);
if (pch) {
XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(pch),&x);
...
input = string(messageParameterName) + "=" + reinterpret_cast<const char*>(decoded);
...
}
...
}
该规则从请求参数构建待签名字符串。它从不读取正文。saml/saml2/binding/impl/SAML2ECPDecoder.cpp 中的 ECP 解码器正好相反。它检查内容类型,然后解析原始正文:
// cpp-opensaml 3.3.1, saml/saml2/binding/impl/SAML2ECPDecoder.cpp, decode()
const HTTPRequest* httpRequest = dynamic_cast<const HTTPRequest*>(&genericRequest);
if (httpRequest) {
string s = httpRequest->getContentType();
if (s.find("application/vnd.paos+xml") == string::npos ||
s.find("application/x-www-form-urlencoded") != string::npos) {
throw BindingException("Invalid content type for PAOS message.");
}
}
const char* data = genericRequest.getRequestBody();
...
istringstream is(data);
DOMDocument* doc = (policy.getValidating() ? XMLToolingConfig::getConfig().getValidatingParser()
: XMLToolingConfig::getConfig().getParser()).parse(is);
这两个组件对消息没有共同的视图。一个请求可以在参数中携带有效的签名消息,同时在正文中携带另一个消息。规则验证前者,解码器解析后者。
SOAP 解码器中也存在同样的不一致,它们同样解析 getRequestBody()。Shibboleth 将 ECP 路径描述为重要路径,因为它会创建会话;将 SOAP 路径描述为提交伪造消息(例如注销请求)的途径。
Shibboleth 在 2025 年 3 月针对 CVE-2025-31335 修复了同一条规则。该修复加强了待签名字符串的构建,并拒绝了重复或带前缀的参数。它没有检查 HTTP 方法和内容类型是否与规则验证的绑定匹配。3.3.2 的更改增加了这项检查。
如何被利用?
- 攻击者向 Service Provider 的 ECP 端点
/Shibboleth.sso/SAML2/ECP发送 POST 请求。 - 查询字符串携带 Service Provider 会接受的 SAML 消息和签名。攻击者可以使用签发给自己的断言,或捕获的旧签名消息。
- 请求正文在 PAOS/SOAP 信封中携带另一个伪造的 SAML Response。伪造消息可以声称来自任何受信任的身份提供者,并携带攻击者想要的任何属性。
SimpleSigning规则读取消息参数,验证查询字符串消息上的签名,并将安全策略标记为已认证。- ECP 解码器忽略查询字符串。它解析正文中的伪造 Response。
- Service Provider 接受伪造断言,并以攻击者选择的身份和属性创建会话。
CVE-2026-145755 没有公开的利用代码,因此该路径是根据公告和补丁重建的。
攻击如何展开?
一个请求携带两个消息:签名规则验证查询字符串中的有效消息,同时 ECP 解码器解析正文中的伪造消息。
查询字符串中的签名消息"] --> B["SimpleSigning 验证
查询字符串消息"] --> C["没有绑定检查:
ECP 解码器读取 SOAP 正文"] --> D["伪造断言被接受
可冒充任何受信任 IdP"] --> E["以攻击者选择的属性
创建会话"] --> F["受保护资源
可访问"]
攻击者能做什么?
能够到达 ECP 端点的攻击者可以以 Service Provider 信任的任何身份提供者的任何用户身份创建会话,并携带伪造断言中的属性。
影响是访问 Service Provider 为该身份保护的所有资源。公告称伪造消息“can appear to come from any trusted Identity Provider and contain any data desired by the attacker”,并绕过“any access control measures in place”。如果下游应用程序信任这些属性,伪造会话可以携带管理员或教师属性。
该攻击需要四个条件:
- ECP 端点可从攻击者的网络访问。
- Service Provider 链接了 3.3.2 之前的 OpenSAML C++。
- 攻击者能够获取或重用 Service Provider 接受的签名消息,使签名规则返回真。
- Service Provider 信任伪造断言中声称的身份提供者。在联合体中,这通常意味着许多提供者。
SOAP 变体范围更窄。公告称这些端点不创建会话,并以伪造的注销请求为例。
该漏洞不会带来代码执行或直接访问数据库。它的影响是伪造身份所携带的访问权限。
为什么修复有效?
修复将每个绑定固定到其 HTTP 方法和内容类型,因此一个请求不能再被读取为两个不同的消息。
SimpleSigning 规则现在拒绝任何不是 GET 或表单编码 POST 的请求:
@@ saml/binding/impl/SimpleSigningRule.cpp
const HTTPRequest* httpRequest = dynamic_cast<const HTTPRequest*>(request);
if (!request || !httpRequest) {
return false;
}
+ const char* method = httpRequest->getMethod();
+ if (!strcmp(method, "POST")) {
+ if (httpRequest->getContentType().find("application/x-www-form-urlencoded") == string::npos) {
+ log.debug("ignoring message, POST without form-urlencoded content type");
+ return false;
+ }
+ }
+ else if (strcmp(method, "GET")) {
+ log.debug("ignoring message, unsupported HTTP method (%s)", method);
+ return false;
+ }
+
// Make sure Signature only shows up once.
ECP 解码器现在要求 POST,并且仍然拒绝表单编码的内容类型:
@@ saml/saml2/binding/impl/SAML2ECPDecoder.cpp
const HTTPRequest* httpRequest = dynamic_cast<const HTTPRequest*>(&genericRequest);
if (httpRequest) {
+ if (strcmp(httpRequest->getMethod(), "POST")) {
+ log.warn("ignoring non-POST request (%s)", httpRequest->getMethod());
+ throw BindingException("Invalid HTTP method ($1).", params(1, httpRequest->getMethod()));
+ }
string s = httpRequest->getContentType();
if (s.find("application/vnd.paos+xml") == string::npos ||
s.find("application/x-www-form-urlencoded") != string::npos) {
SOAP 解码器也收到了相同的仅限 POST 的检查。补丁还在 SignatureProfileValidator.cpp 中的 tlist->getSize() 之前增加了空值检查,消除了签名 Reference 没有转换列表时的崩溃。
这些检查合在一起,使每个请求只有一种解释。PAOS 或 SOAP POST 无法满足 SimpleSigning 规则,因为其内容类型不是表单编码。表单编码的 POST 无法到达 ECP 或 SOAP 解码器,因为这些解码器拒绝该内容类型。签名规则和解码器不再能看到不同的消息。
补丁覆盖了公告提到的两个解码器和该规则。更改的文件中没有同一策略下读取正文的其他解码器。
如何检查是否已遭入侵?
Shibboleth 尚未发布指标。它表示认为证据通常可以在 Web 访问日志中看到,并暂时不公布细节,以便运维人员先保护系统。
在该指南发布之前,请检查以下路径的访问日志:
/Shibboleth.sso/SAML2/ECP,ECP 处理程序。/Shibboleth.sso/SLO/SOAP、/Shibboleth.sso/NIM/SOAP和/Shibboleth.sso/Artifact/SOAP,公告缓解措施中列出的 SOAP 处理程序。
查找发往这些路径的 POST 请求,其查询字符串携带 SAML 参数,而正文是 XML 或 PAOS。这种分离就是该漏洞的形态。然后将这些请求前后创建的会话与通常为该用户服务的身份提供者进行比较。签发者或属性与该提供者不匹配的会话是值得调查的线索。
ECP 路径上的命中本身不是证据。合法的 ECP 客户端也使用同一端点。失败的尝试可能不会留下痕迹。
时间线
- 2025-03-13:Shibboleth 发布 secadv_20250313 公告,涉及同一非 XML 签名规则中的参数操纵漏洞 CVE-2025-31335。OpenSAML 3.3.1 修复了它。
- 2025-03-28:CVE-2025-31335 发布。
- 2026-11-30:Shibboleth 发布 secadv_20261130 公告,提交修复 ba8fb409,并发布 Windows 版 Service Provider 3.6.1。
- 2026-12-06:CVE-2026-145755 发布。
常见问题
ECP 端点默认启用吗?
是的。公告称 ECP 端点默认启用,Shibboleth 补充说大多数部署不使用它。如果您不知道是否使用 ECP,几乎可以肯定没有使用。
在 Linux 上更新 Service Provider 软件包能修复吗?
不能。在 Linux 上,Service Provider 加载单独的 libsaml 库,因此仅更新 shibboleth 软件包会留下有漏洞的库。请更新 libsaml13 或发行版的 opensaml 软件包,然后重启 shibd。
有公开的利用代码吗?
没有。2026-12-06 在 GitHub 仓库中搜索 CVE-2026-145755 没有结果,也没有公开的研究人员分析。本文中的攻击步骤来自公告和补丁。
CVE-2026-145755 在野被利用了吗?
没有确认的利用报告。截至 2026-12-06,该 CVE 不在 CISA 的 Known Exploited Vulnerabilities 目录(版本 2026.12.04)中。Shibboleth 表示暂时不公布访问日志证据,因此没有公开报告并不能证明没有人尝试过。
哪些版本已修复?
OpenSAML C++ 3.3.2 及更高版本。在 Windows 上,Service Provider 3.6.1 捆绑了它。Debian 13 在 3.3.1-2+deb13u1 中提供了向后移植。Debian 12 和 Debian unstable 在 2026-12-06 没有修复包。
禁用 ECP 会破坏单点登录吗?
不会。禁用 ECP 只会移除 Enhanced Client/Proxy 配置文件,大多数基于浏览器的单点登录并不使用它。如果您使用 ECP 且无法修复,缓解措施还会移除 SimpleSigning 规则,这会破坏通过 HTTP-Redirect 进行的签名注销。
参考文献
- Shibboleth Consortium,“Shibboleth Service Provider Security Advisory [30 November 2026]”,secadv_20261130,2026-11-30 发布(2026 年 12 月 6 日检查):https://shibboleth.net/community/advisories/secadv_20261130.txt
- CVE Program,“CVE-2026-145755”记录,2026-12-06 发布(2026 年 12 月 6 日检查):https://www.cve.org/CVERecord?id=CVE-2026-145755
- Shibboleth,修复提交 ba8fb409,“XML handling improvements”,2026-11-30(2026 年 12 月 6 日检查):https://codeberg.org/Shibboleth/cpp-opensaml/commit/ba8fb40945176567b50a01c77787f432ddb662cf
- Shibboleth,secadv_20261130 的常见问题与缓解措施,2026-11-30 发布(2026 年 12 月 6 日检查):https://shibboleth.atlassian.net/wiki/spaces/SP3/pages/5885067302/secadv_20261130
- Shibboleth,OpenSAML C++ 标签,包括 3.3.2(2026 年 12 月 6 日检查):https://codeberg.org/Shibboleth/cpp-opensaml/tags
- Shibboleth,Service Provider 3.6.1 下载列表,2026-11-30 发布(2026 年 12 月 6 日检查):https://shibboleth.net/downloads/service-provider/3.6.1/
- Shibboleth,标签 3.3.1 的
SimpleSigningRule.cpp,有漏洞的规则(2026 年 12 月 6 日检查):https://codeberg.org/Shibboleth/cpp-opensaml/src/tag/3.3.1/saml/binding/impl/SimpleSigningRule.cpp - Shibboleth,标签 3.3.1 的
SAML2ECPDecoder.cpp,有漏洞的解码器(2026 年 12 月 6 日检查):https://codeberg.org/Shibboleth/cpp-opensaml/src/tag/3.3.1/saml/saml2/binding/impl/SAML2ECPDecoder.cpp - Shibboleth,标签 3.3.2 的
SimpleSigningRule.cpp,修复后的规则(2026 年 12 月 6 日检查):https://codeberg.org/Shibboleth/cpp-opensaml/src/tag/3.3.2/saml/binding/impl/SimpleSigningRule.cpp - Shibboleth,标签 3.3.2 的
SAML2ECPDecoder.cpp,修复后的解码器(2026 年 12 月 6 日检查):https://codeberg.org/Shibboleth/cpp-opensaml/src/tag/3.3.2/saml/saml2/binding/impl/SAML2ECPDecoder.cpp - Shibboleth Consortium,“Shibboleth Service Provider Security Advisory [13 March 2025]”,secadv_20250313,2025-03-13 发布(2026 年 12 月 6 日检查):https://shibboleth.net/community/advisories/secadv_20250313.txt
- CVE Program,“CVE-2025-31335”记录,2025-03-28 发布(2026 年 12 月 6 日检查):https://www.cve.org/CVERecord?id=CVE-2025-31335
- Debian Security Tracker,opensaml 源码包和 trixie 的修复版本,2026-12-06 检查(2026 年 12 月 6 日检查):https://security-tracker.debian.org/tracker/source-package/opensaml
- UK Access Management Federation(Jisc),“UK federation members security advisory: Service Provider (SP) 2026-11-30”,2026-11-30 发布(2026 年 12 月 6 日检查):https://www.ukfederation.org.uk/content/News/2026-11-30-Shibboleth-Service-Provider-Security-Advisories
- CISA,Known Exploited Vulnerabilities 目录,版本 2026.12.04(2026 年 12 月 6 日检查):https://www.cisa.gov/known-exploited-vulnerabilities-catalog
继续阅读
