Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 430199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:51:04+00:00 2026-05-12T19:51:04+00:00

I just implemented uploadify in my project, and I noticed what seems like an

  • 0

I just implemented uploadify in my project, and I noticed what seems like an important security issue with the uploading process:

The folder in which the file should be uploaded is provided as a javascript argument, so client-side. If the user changes the script, and fills in a different folder (i.e. “/”) for the upload, the file gets uploaded to the different folder.

There is an option in the config to filter the filetypes, but again it’s provided on the client side (“fileExt”).

So am I wrong to think this could lead to a possible hack? Uploading a php file anywhere in the Web Root and executing it seems easy.

  • Is it the desired behavior?
  • Should I just cross-check the upload folder in the uploadify.php file?
  • Should I send a notice to the uploadify makers?

I’m sure I’m not the first one to think about this. Oh, and the same goes for other config parameters, like sizeLimit and queueSizeLimit.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:51:05+00:00Added an answer on May 12, 2026 at 7:51 pm

    Just looked at the code (haven’t installed it anywhere), and it certainly looks like this is a security problem. Looking at uploadify.php, I see this:

    $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
    

    Which means that passing “/” would put the file in the document root (i.e. the home directory of your website). Of course, the user could easily (for example) pass in a folder parameter like ‘../../etc’ and a file named ‘passwd’. Or, more trivially, he could upload a “logo.jpg” to the document root and, hey, now you’ve got porn for a site logo!

    Of course, even if you sandbox the users, there are still lots of potential problems with allowing a user to arbitrarily upload a file to your server. What if they upload a .php file, then go to that file with their browser? They suddenly have the ability to execute arbitrary code on your server!

    If you want to do this, you should force the user’s uploads into a restricted directory (the realpath function will sanitize the path, in case the user created crazy paths with “../..” or whatever), and you should restrict the types of files allowed (i.e. to only “.jpg”, “.gif”, “.png” or whatever). Even then, a malicious user could DOS you by filling up your disk quota.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just implemented FluentValidation , everything seems awesome except one awkward little detail. @using
We just implemented a drupal site. Performance of the site seems to be an
I've just implemented oauth into a website and it's working great, however it seems
I have just implemented an Ajax File Upload control that uses a progress bar.
I just implemented a number of custom counter_cache s using code like this: def
I have just implemented URL Rewrite Module 2.0 for IIS 7 and it seems
I just implemented QuickSort algorithm from book and got weird output. It works but
I just implemented a remember me feature for a user login on a website.
We just implemented SVN usage at our office and the other dev and myself
So I just implemented a base controller on my MVC3 site in order to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.