Skip to content

[GHSA-9pp5-9c7g-4r83] Spring Security authorization bypass for method security annotations on private methods #5747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: tomabai/advisory-improvement-5747
Choose a base branch
from

Conversation

tomabai
Copy link

@tomabai tomabai commented Jun 24, 2025

Updates

  • Affected products
  • References

Comments
The vulnerability involves both spring-security-aspects and spring-security-core.
spring-security-aspects artifact is right to be flagged because the issue is only exploitable when that module (or @EnableMethodSecurity(mode = ASPECTJ)) is on the classpath.

On the other hand , the actual fix lives in spring-security-core, where the code that scans for security annotations is located. The patch changes a comparison from

if (method == candidate) { … }

to

if (method.equals(candidate)) { … }

Using equals() lets the scanner recognise the same method loaded by different class-loaders/AspectJ weaves, so the annotations are no longer skipped and the bypass is closed.

So to conclude, both packages should be flagged, also the fixing commit is in the core package which is anoth proof that this package is vulnerable. Moreover, to my understanding, if you use spring-security-core 6.4.5 and lower, even with the updated spring-security-aspects 6.4.6 you will still be vulnerable.

@github-actions github-actions bot changed the base branch from main to tomabai/advisory-improvement-5747 June 24, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant