OauthApplinksServlet Open Redirect

XMLWordPrintable

    • 5
    • 4.3

      The OauthApplinksServlet servlet has an open redirect vulnerability in the doGet that will allow phishers to lure users away from legitimate JIRA hosted sites. An open redirect vulnerability is caused by an attacker having control over a request parameter that hasn’t been validated before redirect. Using a relative URL or validating the argument before use should fix the issue.

      File: applinks-plugin\src\main\java\com\atlassian\applinks\core\auth\Oauth\OAuthApplinksServlet.java

      OAuthApplinksServlet.java
      @Override
      protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
      {
      ...
          catch (Exception e)
          {
      ...
              String redirectUrl = getRedirectUrl(req);
              if (redirectUrl == null)
              {
                  redirectUrl = "#";
              }
              context.put("redirectUrl", redirectUrl);
              templateRenderer.render(TEMPLATE, context, resp.getWriter());
      ...
      private String getRedirectUrl(HttpServletRequest req)
      {
          return req.getParameter(REDIRECT_URL_PARAM);
      }
      

              Assignee:
              Oswaldo Hernandez (Inactive)
              Reporter:
              Dan Hodson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: