Spring Security
  1. Spring Security
  2. SEC-1741

ContextPropagatingRemoteInvocation should not be able to pass a SecurityContext object

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.6, 3.0.5, 3.1.0.RC2
    • Fix Version/s: 3.0.6, 3.1.0.RC3, 2.0.7
    • Component/s: Core
    • Labels:
      None

      Description

      Various potential attacks have been reported which rely on the deserialization of the SecurityContext/Authentication combination used by this class.

      Realistically, a remote client should be limited to providing simple user/credentials information which is not automatically deserialized into instances of framework classes. The Authentication object should only be created in the server VM.

        Activity

        Hide
        Luke Taylor added a comment -

        Remote invocation is now only possible using String values for principal and credentials.

        Show
        Luke Taylor added a comment - Remote invocation is now only possible using String values for principal and credentials.
        Hide
        Vamsee Koneru added a comment -

        This breaks authentication using security:authentication-manager. ProviderManager erases credentials after authentication, causing a NullPointerException in ContextPropagatingRemoteInvocation, line 69, when getting credentials as a String:

        {{
        67: if (currentUser != null)

        { 68: principal = currentUser.getName(); 69: credentials = currentUser.getCredentials().toString(); 70: }

        }}

        Is this a known issue?

        Show
        Vamsee Koneru added a comment - This breaks authentication using security:authentication-manager. ProviderManager erases credentials after authentication, causing a NullPointerException in ContextPropagatingRemoteInvocation, line 69, when getting credentials as a String: {{ 67: if (currentUser != null) { 68: principal = currentUser.getName(); 69: credentials = currentUser.getCredentials().toString(); 70: } }} Is this a known issue?

          People

          • Assignee:
            Luke Taylor
            Reporter:
            Luke Taylor
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: