Enhance security by limiting the script extension
| Request #55181 | Enhance security by limiting the script extension | ||||
|---|---|---|---|---|---|
| Submitted: | 2011-07-11 08:29 UTC | Modified: | 2011-10-08 19:52 UTC | ||
| From: | fat@php.net | Assigned: | fat (profile) | ||
| Status: | Closed | Package: | FPM related | ||
| PHP Version: | 5.3.6 | OS: | any | ||
| Private report: | No | CVE-ID: | None | ||
[2011-07-11 08:29 UTC] fat@php.net
Description: ------------ If the web server in front of FPM is misconfigured, FPM can parse and execute PHP code from any kind of files (test.php, test.txt, test.jpg, test.css, ...). It should be possible to limit the extension of the primary script FPM will execute. Something like (in pool configuration) security.limit_extensions = .php if the primary script does not end with .php, an access denied is returned (403).
Patches
fpm-extensions.v2.patch (last revision 2011-07-11 14:19 UTC by fat@php.net)fpm-extensions.v1.patch (last revision 2011-07-11 12:36 UTC by fat@php.net)
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2011-07-11 08:29 UTC] fat@php.net
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: fat
[2011-07-12 19:01 UTC] fat@php.net
[2011-10-08 19:52 UTC] fat@php.net
-Status: Analyzed +Status: Closed
[2011-10-08 19:52 UTC] fat@php.net
[2012-01-13 08:57 UTC] laph at gmx dot net
[2012-01-14 12:16 UTC] public at grik dot net
[2012-01-16 10:32 UTC] gwenmael dot rouxel at neovote dot com
[2012-05-03 13:16 UTC] cbarry at artspan dot com
The default for this new setting should not be '.php'. There are many reasons that people may choose different file extensions (or no extension at all), and this new feature will break all those pages. ('Access Denied.' message) I've found that a way to change this setting is to use: security.limit_extensions = FALSE Which should be the default, or at least documented in the configuration files Using PHP 5.3.10-1ubuntu3 (latest available version for ubuntu precise)