Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

apache/openwebbeans
main @ 2a85556
2
Fixes
0
CVEs
MEDIUM
Peak severity
Highlights
Auth Bypass: 2 prior fixes. Scrutinize any change in this area.
webbeans-impl/src/main/java/org/apache/webbeans/corespi/security/ManagedSecurityService.java: most-fixed (1 issue). Treat as high-risk during review.
0 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Auth Bypass: Returning static thread-local principals directly in a container environment can lead to security context leaking across requests. Using a dynamic proxy wrapper that lazily delegates to the current thread-bound principal mitigates this session-crossover risk.
Auth Bypass: Core security services are vulnerable to subclassing and inheritance-based bypasses. Implementing class finality checks and dynamic stack-trace verification during initialization prevents unauthorized callers from overriding critical security checks.