領先一步
VMware 提供培訓和認證,以加速您的進度。
瞭解更多資訊Spring Security 的版本 5.7(早於 5.7.5 的版本)和 5.6(早於 5.6.9 的版本)可能容易受到透過 forward 或 include 派遣器類型繞過授權規則的影響。
具體而言,當符合以下所有條件時,應用程式存在漏洞
AuthorizationFilter
或透過 authorizeHttpRequests()
方法使用。FilterChainProxy
配置為應用於 forward 和/或 include 請求(例如,spring.security.filter.dispatcher-types = request, error, async, forward, include
)。authorizeHttpRequests().shouldFilterAllDispatcherTypes(true)
應用於每個派遣器類型如果符合以下任何條件,則應用程式不存在漏洞
authorizeHttpRequests()
或 AuthorizationFilter
。受影響版本的用戶應採用以下緩解措施
authorizeRequests().filterSecurityInterceptorOncePerRequest(false)
而不是 authorizeHttpRequests().shouldFilterAllDispatcherTypes(true)
shouldFilterAllDispatcherTypes
的用戶應新增 ObjectPostProcessor
authorizeHttpRequests().withObjectPostProcessor(new
ObjectPostProcessor() {
@Override
public O postProcess(O filter) {
filter.setObserveOncePerRequest(false);
filter.setFilterAsyncDispatch(true);
filter.setFilterErrorDispatch(true);
return filter;
}});
請注意,在 Spring Security 5 中,預設行為是不對請求多次應用篩選器,因此您必須明確配置 Spring Security 才能做到這一點。此外,FilterChainProxy 也未配置為在 forward 和 include 派遣器類型上調用,具體取決於您自己。
已修復此問題的版本包括
此問題由 Qi'anxin Group 的 Legendsec 的 SGLAB 的 Osword 識別並負責地報告。
若要報告 Spring 產品組合中專案的安全性漏洞,請參閱安全性政策