security

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
security [2016/10/30 05:04] – created stassecurity [2019/11/04 08:31] – add explicit FFI clause krakjoe
Line 1: Line 1:
 +====== Meta ======
 +
 +   * Authors: Release Managers
 +   * Date: November 2016
 +   * Version: 1.0.1
 +   * RFC: [[rfc:security-classification|Security Issue Classification]]
 +
 +====== Introduction ======
 +
 For the sake of our users, we classify some of the issues found in PHP as "security issues". This document is intended to explain which issues are thus classified, how we handle those issues and how to report them. For the sake of our users, we classify some of the issues found in PHP as "security issues". This document is intended to explain which issues are thus classified, how we handle those issues and how to report them.
  
 ====== Classification ====== ====== Classification ======
  
-We classify as security issues bugs that allow users to execute unauthorized actionscross security boundariesaccess data that is not intended to be accessibleseverely impact accessibility or performance of the system, etc. The purpose of this classification is to alert the users and the developers about the bugs that need to be prioritized in their handling. +We classify as security issues bugs that
 + 
 +   allow users to execute unauthorized actions 
 +   cross security boundaries 
 +   access data that is not intended to be accessible 
 +   severely impact accessibility or performance of the system  
 +  
 +The purpose of this classification is to alert the users and the developers about the bugs that need to be prioritized in their handling. 
  
 We define three categories of security issues, by their severity, described below. Please note that this categorization is in many aspects subjective, so it ultimately relies on the judgement of the PHP developers.  We define three categories of security issues, by their severity, described below. Please note that this categorization is in many aspects subjective, so it ultimately relies on the judgement of the PHP developers. 
Line 9: Line 25:
 ===== High severity ===== ===== High severity =====
  
-This issue would allow third party to compromise any or most of the hosts running PHP, allowing to run arbitrary code or disable the system completely or access any file local PHP user can access. The issue can be triggered on any PHP install or on most typical PHP installs, and does not require exotic and non-recommended settings to be triggered. +These issues may allow
  
-This category also involves issues that can be triggered in code or functions known to be frequently used (session, json, mysql, openssl, etc.) on the course of their typical usage, and that require settings or configurations that may not be strictly the best practice but are commonly used. +  * third party to compromise any, or most installations of PHP 
 +  * the execution of arbitrary code 
 +  * disabling the system completely 
 +  * access to any file a local PHP user can access.  
 +  
 +The issue can be triggered on any, or on most typical installations, and does not require exotic and non-recommended settings to be triggered.  
 + 
 +This category also includes issues that can be triggered in code or functions known to be frequently used (session, json, mysql, openssl, etc.) during typical usage, and that require settings or configurations that may not be strictly the best practicebut are commonly used. 
  
 This category also may include issues that require special code or code pattern if such code or pattern is present in many popular libraries. This category also may include issues that require special code or code pattern if such code or pattern is present in many popular libraries.
  
-This kind of issues usually require a CVE report.+This kind of issues usually requires a CVE report.
  
 ===== Medium severity ===== ===== Medium severity =====
  
 +These issues may have the same potential to compromise an installation as a high severity issue, but may also require:
  
-This issue allows the same level of compromise as high severity issue, but requires particular and not commonly used extension, or particular type of settings, that is used only in narrow specific circumstances, or relies on older version of third-party library being used when building or deploying PHP. The common idea is that it is like a high severity issue but only if you have very specific set of circumstances that is not common.  +  * an extension that is not commonly used 
- +  * a particular type of configuration that is used only in narrow specific circumstances 
-This category also may include issues that require special code or code pattern if such code or pattern is known to be used in industry code infrequently, or in old code, or otherwise is not very common. If the usage is common and frequent, the severity is high. +  * relies on old version of third-party library being used 
 +  codeor patterns of code, that are known to be used infrequently 
 +  * code that is very old, or extremely uncommon (and so is used infrequently)
  
 This kind of issues usually will have a CVE number, unless the required configuration is particularly exotic to the point it's not practically usable. This kind of issues usually will have a CVE number, unless the required configuration is particularly exotic to the point it's not practically usable.
Line 28: Line 54:
 ===== Low severity ===== ===== Low severity =====
  
-This issue allows theoretical compromise of security, but practical attack is usually impossible or extremely hard due to common practices or limitations that are virtually always present. +This issue allows theoretical compromise of security, but practical attack is usually impossible or extremely hard due to common practices or limitations that are virtually always present or imposed.  
 + 
 +This also includes problems with configuration, documentation, and other non-code parts of the PHP project that may mislead users, or cause them to make their system, or their code less secure
  
-This also includes problems with configuration, documentation and other non-code parts of the PHP project that may mislead users or cause them to make their system or their code less secure+Issues that can trigger unauthorized actions that do not seem to be useful for any practical attack can also be categorized as low severity.
  
-Issues that can trigger unauthorized actions that do not seem to be useful for any practical attack can also be categorized as low severity+Security issues, that are present only in unstable branches, belong to this category, too. Any branch that has no stable release, is per se not intended for the production use.
  
-Low severity issues usually do not need to have CVE and, on PHP developer'discretion, may be disclosed publicly before the actual fix is released or available. +Low severity issues usually do not need to have CVE and mayat the discretion of the PHP developers, be disclosed publicly before the fix is released or available. 
  
 ===== Not a security issue ===== ===== Not a security issue =====
  
-We do not classify as a security issue any issue that requires the server to run specific code (unless it is a very simple frequently used pattern, such as starting a session, calling a constructor, throwing an exception, etc.) or call specific functions with specific arguments (unless such arguments commonly are supplied by the external user in a typical code - e.g. bug in input sanitizing functions). Same for any issue that requires specific non-common actions to be performed on the server to trigger it and usually can be performed only by a person that already has access to the server equal or superior to that the user running PHP server has. +We do not classify as a security issue any issue that
  
-We do not classify as a security issue bugs in debug functions or stemming from the use of debug functionality such as xdebug, var_dump, etc. - or from enabling settings documented as not recommended for production - such as error reporting to output, etc+  * requires invocation of specific code, which may be valid but is obviously malicious 
 +  * requires invocation of functions with specific arguments, which may be valid but are obviously malicious 
 +  * requires specific actions to be performed on the server, which are not commonly performed, or are not commonly permissible for the user (uid) executing PHP 
 +  * requires privileges superior to that of the user (uid) executing PHP 
 +  * requires the use of debugging facilities ex. xdebug, var_dump 
 +  * requires the use of settings not recommended for production - ex. error reporting to output 
 +  * requires the use of non-standard environment variables - exUSE_ZEND_ALLOC 
 +  * requires the use of non-standard builds - ex. obscure embedded platform, not commonly used compiler 
 +  * requires the use of code or settings known to be insecure 
 +  * requires the use of FFI
  
-We do not classify as security issue  
  
 ====== Handling issues ====== ====== Handling issues ======
Line 52: Line 88:
 ====== FAQ ====== ====== FAQ ======
  
-Q. How I report a security issue? +Q. How do I report a security issue?\\ 
-A. Please report it on bugs.php.net, choosing type "security". This will automatically make it private. If for some reason you can not do that, or need to talk to somebody about PHP security issue that is not exactly a bug report, please write to security@php.net. +A. Please report it on http://bugs.php.net, choosing type "Security". This will automatically make it private. If for some reason you can not do that, or need to talk to somebody about PHP security issue that is not exactly a bug report, please write to security@php.net. 
  
-Q. What do you consider responsible disclosure? +Q. What do you consider responsible disclosure?\\ 
-A. Please report the issue as described above. Please communicate with the developers about when the fix will be released - usually it's the next monthly release after the bug was reported. Some issue can take longer. After the fix is released (releases usually happen on Thursday) please feel free to disclose the issue as you see fit. +A. Please report the issue as described above. Please communicate with the developers about when the fix will be released - usually it's the next monthly release after the bug was reported. Some issues can take longer. After the fix is released (releases usually happen on Thursday) please feel free to disclose the issue as you see fit. 
  
-Q. What if I think it's a security issue but developers disagree? +Q. What if I think it's a security issue but developers disagree?\\ 
-A. Please read the above and try to explain us why it fits the description.+A. Please read the above and try to explain to us why it fits the description.
  
-Q. What if developers still don't think it's a security issue?+Q. What if developers still don't think it's a security issue?\\
 A. We'll have to agree to disagree. A. We'll have to agree to disagree.
  
-Q. The bug I submitted was classified as "not a security issue", you don't believe it's real?+Q. The bug I submitted was classified as "not a security issue", you don't believe it's real?\\
 A. It has nothing to do with the bug being real or its importance to you. It just means it does not fit our specific definitions for issues that we will handle in a special way. We fix a lot of non-security bugs and pull requests are always welcome.  A. It has nothing to do with the bug being real or its importance to you. It just means it does not fit our specific definitions for issues that we will handle in a special way. We fix a lot of non-security bugs and pull requests are always welcome. 
  
-Q. But you classified bug #424242 as security issue, but not this one?!+Q. But you classified bug #424242 as security issue, but not this one?!\\
 A. Each bug usually has its aspects, if a short discussion does not yield agreement we'd rather do more fixing and less arguing.  A. Each bug usually has its aspects, if a short discussion does not yield agreement we'd rather do more fixing and less arguing. 
  
-Q. Do you pay bounties for security issues?+Q. Do you pay bounties for security issues?\\
 A. PHP is a volunteer project. We have no money, thus we can't pay them. A. PHP is a volunteer project. We have no money, thus we can't pay them.
  
  
security.txt · Last modified: 2024/01/30 17:35 by derick