Viewing 1 replies (of 1 total)
  • Plugin Author Cornelius Bergen

    (@cbergen)

    I like the whitelist approach since anything other than a known static file should simply return ‘Forbidden’ which is, I think, a good response. With the SetHandler method, PHP files are actually downloaded.

    The multiple extensions issue is very real though and should be addressed. I wonder if it would be worth trying to fix that issue closer to the web root rather than just the uploads folder. Here’s an old but relevant discussion:
    https://core.trac.www.ads-software.com/ticket/11122#comment:8

    Maybe something like this should be recommended for the root .htaccess file (only if the server is deemed vulnerable)?…

    <Files *>
      SetHandler default-handler
    </Files>
    <FilesMatch \.php$>
      SetHandler application/x-httpd-php
    </FilesMatch>

    This is untested as well. But if it works, I would prefer to leave the uploads directory fix as-is.

    Thanks for the suggestion! I’ll be testing this on a vulnerable server and will definitely consider this for the next release.

Viewing 1 replies (of 1 total)
  • The topic ‘Fix for uploads directory code execution doesn't work’ is closed to new replies.