Skip to content

Commit 5845a52

Browse files
committed
Add a SECURITY.md community health file to the repo
Following GitHub's best practices,[^1] this adds our previously voted on and approved[^2] security classification document[^3] to the repository. [^1]: https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository [^2]: https://wiki.php.net/rfc/security-classification [^3]: https://wiki.php.net/security
1 parent 735b94a commit 5845a52

File tree

1 file changed

+165
-0
lines changed

1 file changed

+165
-0
lines changed

SECURITY.md

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# Security Classification Document
2+
3+
*The canonical version of this document is located at <https://wiki.php.net/security>.
4+
Where there are discrepancies, the canonical version takes precedence.*
5+
6+
## Meta
7+
8+
- Authors: Release Managers
9+
- Date: November 2016
10+
- Version: 1.0.1
11+
- RFC: [Security Issue Classification](https://wiki.php.net/rfc/security-classification)
12+
13+
## Introduction
14+
15+
For the sake of our users, we classify some of the issues found in PHP
16+
as "security issues". This document is intended to explain which issues
17+
are thus classified, how we handle those issues and how to report them.
18+
19+
## Classification
20+
21+
We classify as security issues bugs that:
22+
23+
- allow users to execute unauthorized actions
24+
- cross security boundaries
25+
- access data that is not intended to be accessible
26+
- severely impact accessibility or performance of the system
27+
28+
The purpose of this classification is to alert the users and the
29+
developers about the bugs that need to be prioritized in their handling.
30+
31+
We define three categories of security issues, by their severity,
32+
described below. Please note that this categorization is in many aspects
33+
subjective, so it ultimately relies on the judgement of the PHP
34+
developers.
35+
36+
### High severity
37+
38+
These issues may allow:
39+
40+
- third party to compromise any, or most installations of PHP
41+
- the execution of arbitrary code
42+
- disabling the system completely
43+
- access to any file a local PHP user can access.
44+
45+
The issue can be triggered on any, or on most typical installations, and
46+
does not require exotic and non-recommended settings to be triggered.
47+
48+
This category also includes issues that can be triggered in code or
49+
functions known to be frequently used (session, json, mysql, openssl,
50+
etc.) during typical usage, and that require settings or configurations
51+
that may not be strictly the best practice, but are commonly used.
52+
53+
This category also may include issues that require special code or code
54+
pattern if such code or pattern is present in many popular libraries.
55+
56+
This kind of issues usually requires a CVE report.
57+
58+
### Medium severity
59+
60+
These issues may have the same potential to compromise an installation
61+
as a high severity issue, but may also require:
62+
63+
- an extension that is not commonly used
64+
- a particular type of configuration that is used only in narrow
65+
specific circumstances
66+
- relies on old version of a third-party library being used
67+
- code, or patterns of code, that are known to be used infrequently
68+
- code that is very old, or extremely uncommon (and so is used
69+
infrequently)
70+
71+
This kind of issues usually will have a CVE number, unless the required
72+
configuration is particularly exotic to the point it's not practically
73+
usable.
74+
75+
### Low severity
76+
77+
This issue allows theoretical compromise of security, but practical
78+
attack is usually impossible or extremely hard due to common practices
79+
or limitations that are virtually always present or imposed.
80+
81+
This also includes problems with configuration, documentation, and other
82+
non-code parts of the PHP project that may mislead users, or cause them
83+
to make their system, or their code less secure.
84+
85+
Issues that can trigger unauthorized actions that do not seem to be
86+
useful for any practical attack can also be categorized as low severity.
87+
88+
Security issues, that are present only in unstable branches, belong to
89+
this category, too. Any branch that has no stable release, is per se not
90+
intended for the production use.
91+
92+
Low severity issues usually do not need to have CVE and may, at the
93+
discretion of the PHP developers, be disclosed publicly before the fix
94+
is released or available.
95+
96+
### Not a security issue
97+
98+
We do not classify as a security issue any issue that:
99+
100+
- requires invocation of specific code, which may be valid but is
101+
obviously malicious
102+
- requires invocation of functions with specific arguments, which may
103+
be valid but are obviously malicious
104+
- requires specific actions to be performed on the server, which are
105+
not commonly performed, or are not commonly permissible for the user
106+
(uid) executing PHP
107+
- requires privileges superior to that of the user (uid) executing PHP
108+
- requires the use of debugging facilities - ex. xdebug, var_dump
109+
- requires the use of settings not recommended for production - ex.
110+
error reporting to output
111+
- requires the use of non-standard environment variables - ex.
112+
USE_ZEND_ALLOC
113+
- requires the use of non-standard builds - ex. obscure embedded
114+
platform, not commonly used compiler
115+
- requires the use of code or settings known to be insecure
116+
- requires the use of FFI
117+
- requires an open_basedir bypass
118+
119+
## Handling issues
120+
121+
High and medium severity fixes are merged into a security repository and
122+
merged before the release is tagged.
123+
124+
Low severity fixes are merged immediately after the fix is available and
125+
handled like all regular bugs are handled consequently. However, release
126+
managers may choose to pull those fixes into the RC branch after the
127+
branch is created, and also backport them into security-only release
128+
branch.
129+
130+
## FAQ
131+
132+
Q. How do I report a security issue?\
133+
A. Please report it on <http://bugs.php.net>, choosing type "Security".
134+
This will automatically make it private. If for some reason you can not
135+
do that, or need to talk to somebody about a PHP security issue that is
136+
not exactly a bug report, please write to [email protected].
137+
138+
Q. What do you consider a responsible disclosure?\
139+
A. Please report the issue as described above. Please communicate with
140+
the developers about when the fix will be released - usually it's the
141+
next monthly release after the bug was reported. Some issues can take
142+
longer. After the fix is released (releases usually happen on Thursday)
143+
please feel free to disclose the issue as you see fit.
144+
145+
Q. What if I think it's a security issue but developers disagree?\
146+
A. Please read the above and try to explain to us why it fits the
147+
description.
148+
149+
Q. What if developers still don't think it's a security issue?\
150+
A. We'll have to agree to disagree.
151+
152+
Q. The bug I submitted was classified as "not a security issue", you
153+
don't believe it's real?\
154+
A. It has nothing to do with the bug being real or its importance to
155+
you. It just means it does not fit our specific definitions for issues
156+
that we will handle in a special way. We fix a lot of non-security bugs
157+
and pull requests are always welcome.
158+
159+
Q. But you classified bug #424242 as security issue, but not this
160+
one?!\
161+
A. Each bug usually has its aspects, if a short discussion does not
162+
yield agreement we'd rather do more fixing and less arguing.
163+
164+
Q. Do you pay bounties for security issues?\
165+
A. PHP is a volunteer project. We have no money, thus we can't pay them.

0 commit comments

Comments
 (0)