security.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Security policy &#8212; phpMyAdmin 4.8.5 documentation</title>
  7. <link rel="stylesheet" href="_static/classic.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: './',
  12. VERSION: '4.8.5',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="_static/jquery.js"></script>
  19. <script type="text/javascript" src="_static/underscore.js"></script>
  20. <script type="text/javascript" src="_static/doctools.js"></script>
  21. <link rel="index" title="Index" href="genindex.html" />
  22. <link rel="search" title="Search" href="search.html" />
  23. <link rel="copyright" title="Copyright" href="copyright.html" />
  24. <link rel="top" title="phpMyAdmin 4.8.5 documentation" href="index.html" />
  25. <link rel="next" title="Distributing and packaging phpMyAdmin" href="vendors.html" />
  26. <link rel="prev" title="Developers Information" href="developers.html" />
  27. </head>
  28. <body role="document">
  29. <div class="related" role="navigation" aria-label="related navigation">
  30. <h3>Navigation</h3>
  31. <ul>
  32. <li class="right" style="margin-right: 10px">
  33. <a href="genindex.html" title="General Index"
  34. accesskey="I">index</a></li>
  35. <li class="right" >
  36. <a href="vendors.html" title="Distributing and packaging phpMyAdmin"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="developers.html" title="Developers Information"
  40. accesskey="P">previous</a> |</li>
  41. <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.5 documentation</a> &#187;</li>
  42. </ul>
  43. </div>
  44. <div class="document">
  45. <div class="documentwrapper">
  46. <div class="bodywrapper">
  47. <div class="body" role="main">
  48. <div class="section" id="security-policy">
  49. <h1>Security policy<a class="headerlink" href="#security-policy" title="Permalink to this headline">¶</a></h1>
  50. <p>The phpMyAdmin developer team is putting lot of effort to make phpMyAdmin as
  51. secure as possible. But still web application like phpMyAdmin can be vulnerable
  52. to a number of attacks and new ways to exploit are still being explored.</p>
  53. <p>For every reported vulnerability we issue a phpMyAdmin Security Announcement
  54. (PMASA) and it get&#8217;s assigne CVE ID as well. We might group similar
  55. vulnerabilities to one PMASA (eg. multiple XSS vulnerabilities can be announced
  56. under one PMASA).</p>
  57. <p>If you think you&#8217;ve found a vulnerability, please see <a class="reference internal" href="#reporting-security"><span class="std std-ref">Reporting security issues</span></a>.</p>
  58. <div class="section" id="typical-vulnerabilities">
  59. <h2>Typical vulnerabilities<a class="headerlink" href="#typical-vulnerabilities" title="Permalink to this headline">¶</a></h2>
  60. <p>In this secion, we will describe typical vulnerabilities, which can appear in
  61. our code base. This list is by no means complete, it is intended to show
  62. typical attack surface.</p>
  63. <div class="section" id="cross-site-scripting-xss">
  64. <h3>Cross-site scripting (XSS)<a class="headerlink" href="#cross-site-scripting-xss" title="Permalink to this headline">¶</a></h3>
  65. <p>When phpMyAdmin shows a piece of user data, e.g. something inside a user&#8217;s
  66. database, all html special chars have to be escaped. When this escaping is
  67. missing somewhere a malicious user might fill a database with specially crafted
  68. content to trick an other user of that database into executing something. This
  69. could for example be a piece of JavaScript code that would do any number of
  70. nasty things.</p>
  71. <p>phpMyAdmin tries to escape all userdata before it is rendered into html for the
  72. browser.</p>
  73. <div class="admonition seealso">
  74. <p class="first admonition-title">See also</p>
  75. <p class="last"><a class="reference external" href="https://en.wikipedia.org/wiki/Cross-site_scripting">Cross-site scripting on Wikipedia</a></p>
  76. </div>
  77. </div>
  78. <div class="section" id="cross-site-request-forgery-csrf">
  79. <h3>Cross-site request forgery (CSRF)<a class="headerlink" href="#cross-site-request-forgery-csrf" title="Permalink to this headline">¶</a></h3>
  80. <p>An attacker would trick a phpMyAdmin user into clicking on a link to provoke
  81. some action in phpMyAdmin. This link could either be sent via email or some
  82. random website. If successful this the attacker would be able to perform some
  83. action with the users privileges.</p>
  84. <p>To mitigate this phpMyAdmin requires a token to be sent on sensitive requests.
  85. The idea is that an attacker does not poses the currently valid token to
  86. include in the presented link.</p>
  87. <p>The token is regenerated for every login, so it&#8217;s generally valid only for
  88. limited time, what makes it harder for attacker to obtain valid one.</p>
  89. <div class="admonition seealso">
  90. <p class="first admonition-title">See also</p>
  91. <p class="last"><a class="reference external" href="https://en.wikipedia.org/wiki/Cross-site_request_forgery">Cross-site request forgery on Wikipedia</a></p>
  92. </div>
  93. </div>
  94. <div class="section" id="sql-injection">
  95. <h3>SQL injection<a class="headerlink" href="#sql-injection" title="Permalink to this headline">¶</a></h3>
  96. <p>As the whole purpose of phpMyAdmin is to preform sql queries, this is not our
  97. first concern. SQL injection is sensitive to us though when it concerns the
  98. mysql control connection. This controlconnection can have additional privileges
  99. which the logged in user does not poses. E.g. access the <a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a>.</p>
  100. <p>User data that is included in (administrative) queries should always be run
  101. through DatabaseInterface::escapeSring().</p>
  102. <div class="admonition seealso">
  103. <p class="first admonition-title">See also</p>
  104. <p class="last"><a class="reference external" href="https://en.wikipedia.org/wiki/SQL_injection">SQL injection on Wikipedia</a></p>
  105. </div>
  106. </div>
  107. <div class="section" id="brute-force-attack">
  108. <h3>Brute force attack<a class="headerlink" href="#brute-force-attack" title="Permalink to this headline">¶</a></h3>
  109. <p>phpMyAdmin on its own does not rate limit authentication attempts in any way.
  110. This is caused by need to work in stateless environment, where there is no way
  111. to protect against such kind of things.</p>
  112. <p>To mitigate this, you can use Captcha or utilize external tools such as
  113. fail2ban, this is more details described in <a class="reference internal" href="setup.html#securing"><span class="std std-ref">Securing your phpMyAdmin installation</span></a>.</p>
  114. <div class="admonition seealso">
  115. <p class="first admonition-title">See also</p>
  116. <p class="last"><a class="reference external" href="https://en.wikipedia.org/wiki/Brute-force_attack">Brute force attack on Wikipedia</a></p>
  117. </div>
  118. </div>
  119. </div>
  120. <div class="section" id="reporting-security-issues">
  121. <span id="reporting-security"></span><h2>Reporting security issues<a class="headerlink" href="#reporting-security-issues" title="Permalink to this headline">¶</a></h2>
  122. <p>Should you find a security issue in the phpMyAdmin programming code, please
  123. contact the <a class="reference external" href="mailto:security&#37;&#52;&#48;phpmyadmin&#46;net">phpMyAdmin security team</a> in
  124. advance before publishing it. This way we can prepare a fix and release the fix together with your
  125. announcement. You will be also given credit in our security announcement.
  126. You can optionally encrypt your report with PGP key ID
  127. <code class="docutils literal"><span class="pre">DA68AB39218AB947</span></code> with following fingerprint:</p>
  128. <div class="highlight-console"><div class="highlight"><pre><span></span><span class="go">pub 4096R/DA68AB39218AB947 2016-08-02</span>
  129. <span class="go"> Key fingerprint = 5BAD 38CF B980 50B9 4BD7 FB5B DA68 AB39 218A B947</span>
  130. <span class="go">uid phpMyAdmin Security Team &amp;lt;security@phpmyadmin.net&amp;gt;</span>
  131. <span class="go">sub 4096R/5E4176FB497A31F7 2016-08-02</span>
  132. </pre></div>
  133. </div>
  134. <p>The key can be either obtained from the keyserver or is available in
  135. <a class="reference external" href="https://files.phpmyadmin.net/phpmyadmin.keyring">phpMyAdmin keyring</a>
  136. available on our download server or using <a class="reference external" href="https://keybase.io/phpmyadmin_sec">Keybase</a>.</p>
  137. <p>Should you have suggestion on improving phpMyAdmin to make it more secure, please
  138. report that to our <a class="reference external" href="https://github.com/phpmyadmin/phpmyadmin/issues">issue tracker</a>.
  139. Existing improvement suggestions can be found by
  140. <a class="reference external" href="https://github.com/phpmyadmin/phpmyadmin/labels/hardening">hardening label</a>.</p>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  147. <div class="sphinxsidebarwrapper">
  148. <h3><a href="index.html">Table Of Contents</a></h3>
  149. <ul>
  150. <li><a class="reference internal" href="#">Security policy</a><ul>
  151. <li><a class="reference internal" href="#typical-vulnerabilities">Typical vulnerabilities</a><ul>
  152. <li><a class="reference internal" href="#cross-site-scripting-xss">Cross-site scripting (XSS)</a></li>
  153. <li><a class="reference internal" href="#cross-site-request-forgery-csrf">Cross-site request forgery (CSRF)</a></li>
  154. <li><a class="reference internal" href="#sql-injection">SQL injection</a></li>
  155. <li><a class="reference internal" href="#brute-force-attack">Brute force attack</a></li>
  156. </ul>
  157. </li>
  158. <li><a class="reference internal" href="#reporting-security-issues">Reporting security issues</a></li>
  159. </ul>
  160. </li>
  161. </ul>
  162. <h4>Previous topic</h4>
  163. <p class="topless"><a href="developers.html"
  164. title="previous chapter">Developers Information</a></p>
  165. <h4>Next topic</h4>
  166. <p class="topless"><a href="vendors.html"
  167. title="next chapter">Distributing and packaging phpMyAdmin</a></p>
  168. <div role="note" aria-label="source link">
  169. <h3>This Page</h3>
  170. <ul class="this-page-menu">
  171. <li><a href="_sources/security.txt"
  172. rel="nofollow">Show Source</a></li>
  173. </ul>
  174. </div>
  175. <div id="searchbox" style="display: none" role="search">
  176. <h3>Quick search</h3>
  177. <form class="search" action="search.html" method="get">
  178. <div><input type="text" name="q" /></div>
  179. <div><input type="submit" value="Go" /></div>
  180. <input type="hidden" name="check_keywords" value="yes" />
  181. <input type="hidden" name="area" value="default" />
  182. </form>
  183. </div>
  184. <script type="text/javascript">$('#searchbox').show(0);</script>
  185. </div>
  186. </div>
  187. <div class="clearer"></div>
  188. </div>
  189. <div class="related" role="navigation" aria-label="related navigation">
  190. <h3>Navigation</h3>
  191. <ul>
  192. <li class="right" style="margin-right: 10px">
  193. <a href="genindex.html" title="General Index"
  194. >index</a></li>
  195. <li class="right" >
  196. <a href="vendors.html" title="Distributing and packaging phpMyAdmin"
  197. >next</a> |</li>
  198. <li class="right" >
  199. <a href="developers.html" title="Developers Information"
  200. >previous</a> |</li>
  201. <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.5 documentation</a> &#187;</li>
  202. </ul>
  203. </div>
  204. <div class="footer" role="contentinfo">
  205. &#169; <a href="copyright.html">Copyright</a> 2012 - 2018, The phpMyAdmin devel team.
  206. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
  207. </div>
  208. </body>
  209. </html>