| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| org.springframework.security:spring-security-core | maven | < 2.0.7 | 2.0.7 |
| org.springframework.security:spring-security-core | maven | >= 3.0.0, < 3.0.6 | 3.0.6 |
The vulnerability arises because the RunAsManager mechanism stores the Authentication object in a shared SecurityContext without proper synchronization. The AbstractSecurityInterceptor.beforeInvocation method is central to modifying the SecurityContext during security checks, making it a high-confidence candidate for the race condition. The RunAsManagerImpl.buildRunAs method creates the temporary Authentication token, which is then applied to the shared context. In versions prior to the patches, these functions did not adequately handle thread confinement or synchronization, allowing concurrent threads to exploit the shared state. The high confidence in AbstractSecurityInterceptor.beforeInvocation stems from its direct role in context manipulation, while RunAsManagerImpl.buildRunAs is marked medium confidence due to its indirect involvement in setting the vulnerable state.