Skip to content

Commit

Permalink
Fix Spring Autobinding vulnerability
Browse files Browse the repository at this point in the history
1. Make authorizationRequest no longer affected by http request parameters due to @ModelAttribute. See http://agrrrdog.blogspot.com/2017/03/autobinding-vulns-and-spring-mvc.html
  • Loading branch information
artsploit authored and jricher committed Feb 18, 2021
1 parent 0d4ef2c commit 7eba3c1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ public OAuthConfirmationController(ClientDetailsEntityService clientService) {

@PreAuthorize("hasRole('ROLE_USER')")
@RequestMapping("/oauth/confirm_access")
public String confimAccess(Map<String, Object> model, @ModelAttribute("authorizationRequest") AuthorizationRequest authRequest,
Principal p) {
public String confirmAccess(Map<String, Object> model, Principal p) {

AuthorizationRequest authRequest = (AuthorizationRequest) model.get("authorizationRequest");
// Check the "prompt" parameter to see if we need to do special processing

String prompt = (String)authRequest.getExtensions().get(PROMPT);
Expand Down

1 comment on commit 7eba3c1

@abergmann
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CVE-2021-27582 was assigned to this commit.

Please sign in to comment.