Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A78869611 for ; Sun, 10 Mar 2013 21:49:13 +0000 (UTC) Received: (qmail 64953 invoked by uid 500); 10 Mar 2013 21:49:12 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 64881 invoked by uid 500); 10 Mar 2013 21:49:12 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 64871 invoked by uid 99); 10 Mar 2013 21:49:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Mar 2013 21:49:12 +0000 Date: Sun, 10 Mar 2013 21:49:12 +0000 (UTC) From: "Thomas Neidhart (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Reopened] (FILEUPLOAD-212) Insecure request size checking MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FILEUPLOAD-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Neidhart reopened FILEUPLOAD-212: ---------------------------------------- Indeed you are right, using the Streaming API this can happen. When looking at the issue, I did not see the second occurrence of the size check. > Insecure request size checking > ------------------------------ > > Key: FILEUPLOAD-212 > URL: https://issues.apache.org/jira/browse/FILEUPLOAD-212 > Project: Commons FileUpload > Issue Type: Bug > Affects Versions: 1.2.2 > Environment: Default configuration default environment. > Reporter: Damian Kolasa > Assignee: Thomas Neidhart > Priority: Critical > Labels: max_upload_size, resource_depletion, security > Fix For: 1.3 > > Attachments: FILEUPLOAD-212.patch > > Original Estimate: 48h > Remaining Estimate: 48h > > In FileUploadBase there is an issue when checking for upload request size, the check is based on presence of Content-Length header in request and FALSE assumption that when present it will represent the actual request size. Using this fact, attacker can supply request with defined Content-Length of 60 and bypass file upload restrictions, which can lead to successful Resource Depletion type attack. > IMHO by default file upload should return the LimitedInputStream implementation for file upload. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira