security.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. ==========================
  2. Django's security policies
  3. ==========================
  4. Django's development team is strongly committed to responsible
  5. reporting and disclosure of security-related issues. As such, we've
  6. adopted and follow a set of policies which conform to that ideal and
  7. are geared toward allowing us to deliver timely security updates to
  8. the official distribution of Django, as well as to third-party
  9. distributions.
  10. .. _reporting-security-issues:
  11. Reporting security issues
  12. =========================
  13. **Short version: please report security issues by emailing
  14. security@djangoproject.com**.
  15. Most normal bugs in Django are reported to `our public Trac instance`_, but
  16. due to the sensitive nature of security issues, we ask that they **not** be
  17. publicly reported in this fashion.
  18. Instead, if you believe you've found something in Django which has security
  19. implications, please send a description of the issue via email to
  20. ``security@djangoproject.com``. Mail sent to that address reaches the `security
  21. team <https://www.djangoproject.com/foundation/teams/#security-team>`_.
  22. Once you've submitted an issue via email, you should receive an acknowledgment
  23. from a member of the security team within 3 working days. After that, the
  24. security team will begin their analysis. Depending on the action to be taken,
  25. you may receive followup emails. It can take several weeks before the security
  26. team comes to a conclusion. There is no need to chase the security team unless
  27. you discover new, relevant information. All reports aim to be resolved within
  28. the industry-standard 90 days. Confirmed vulnerabilities with a
  29. :ref:`high severity level <severity-levels>` will be addressed promptly.
  30. .. admonition:: Sending encrypted reports
  31. If you want to send an encrypted email (*optional*), the public key ID for
  32. ``security@djangoproject.com`` is ``0xfcb84b8d1d17f80b``, and this public
  33. key is available from most commonly-used keyservers.
  34. .. _our public Trac instance: https://code.djangoproject.com/query
  35. .. _security-report-evaluation:
  36. How does Django evaluate a report
  37. =================================
  38. These are criteria used by the security team when evaluating whether a report
  39. requires a security release:
  40. * The vulnerability is within a :ref:`supported version <security-support>` of
  41. Django.
  42. * The vulnerability does not depend on manual actions that rely on code
  43. external to Django. This includes actions performed by a project's developer
  44. or maintainer using developer tools or the Django CLI. For example, attacks
  45. that require running management commands with uncommon or insecure options
  46. do not qualify.
  47. * The vulnerability applies to a production-grade Django application. This
  48. means the following scenarios do not require a security release:
  49. * Exploits that only affect local development, for example when using
  50. :djadmin:`runserver`.
  51. * Exploits which fail to follow security best practices, such as failure to
  52. sanitize user input. For other examples, see our :ref:`security
  53. documentation <cross-site-scripting>`.
  54. * Exploits in AI generated code that do not adhere to security best practices.
  55. The security team may conclude that the source of the vulnerability is within
  56. the Python standard library, in which case the reporter will be asked to report
  57. the vulnerability to the Python core team. For further details see the `Python
  58. security guidelines <https://www.python.org/dev/security/>`_.
  59. On occasion, a security release may be issued to help resolve a security
  60. vulnerability within a popular third-party package. These reports should come
  61. from the package maintainers.
  62. If you are unsure whether your finding meets these criteria, please still report
  63. it :ref:`privately by emailing security@djangoproject.com
  64. <reporting-security-issues>`. The security team will review your report and
  65. recommend the correct course of action.
  66. .. _security-support:
  67. Supported versions
  68. ==================
  69. At any given time, the Django team provides official security support
  70. for several versions of Django:
  71. * The `main development branch`_, hosted on GitHub, which will become the
  72. next major release of Django, receives security support. Security issues that
  73. only affect the main development branch and not any stable released versions
  74. are fixed in public without going through the :ref:`disclosure process
  75. <security-disclosure>`.
  76. * The two most recent Django release series receive security
  77. support. For example, during the development cycle leading to the
  78. release of Django 1.5, support will be provided for Django 1.4 and
  79. Django 1.3. Upon the release of Django 1.5, Django 1.3's security
  80. support will end.
  81. * :term:`Long-term support release`\s will receive security updates for a
  82. specified period.
  83. When new releases are issued for security reasons, the accompanying
  84. notice will include a list of affected versions. This list is
  85. comprised solely of *supported* versions of Django: older versions may
  86. also be affected, but we do not investigate to determine that, and
  87. will not issue patches or new releases for those versions.
  88. .. _main development branch: https://github.com/django/django/
  89. .. _severity-levels:
  90. Security issue severity levels
  91. ==============================
  92. The severity level of a security vulnerability is determined by the attack
  93. type.
  94. Severity levels are:
  95. * **High**
  96. * Remote code execution
  97. * SQL injection
  98. * **Moderate**
  99. * Cross site scripting (XSS)
  100. * Cross site request forgery (CSRF)
  101. * Denial-of-service attacks
  102. * Broken authentication
  103. * **Low**
  104. * Sensitive data exposure
  105. * Broken session management
  106. * Unvalidated redirects/forwards
  107. * Issues requiring an uncommon configuration option
  108. .. _security-disclosure:
  109. How Django discloses security issues
  110. ====================================
  111. Our process for taking a security issue from private discussion to
  112. public disclosure involves multiple steps.
  113. Approximately one week before public disclosure, we send two notifications:
  114. First, we notify |django-announce| of the date and approximate time of the
  115. upcoming security release, as well as the severity of the issues. This is to
  116. aid organizations that need to ensure they have staff available to handle
  117. triaging our announcement and upgrade Django as needed.
  118. Second, we notify a list of :ref:`people and organizations
  119. <security-notifications>`, primarily composed of operating-system vendors and
  120. other distributors of Django. This email is signed with the PGP key of someone
  121. from `Django's release team`_ and consists of:
  122. * A full description of the issue and the affected versions of Django.
  123. * The steps we will be taking to remedy the issue.
  124. * The patch(es), if any, that will be applied to Django.
  125. * The date on which the Django team will apply these patches, issue
  126. new releases and publicly disclose the issue.
  127. On the day of disclosure, we will take the following steps:
  128. #. Apply the relevant patch(es) to Django's codebase.
  129. #. Issue the relevant release(s), by placing new packages on the :pypi:`Python
  130. Package Index <Django>` and on the `djangoproject.com website
  131. <https://www.djangoproject.com/download/>`_, and tagging the new release(s)
  132. in Django's git repository.
  133. #. Post a public entry on `the official Django development blog`_,
  134. describing the issue and its resolution in detail, pointing to the
  135. relevant patches and new releases, and crediting the reporter of
  136. the issue (if the reporter wishes to be publicly identified).
  137. #. Post a notice to the |django-announce| and oss-security@lists.openwall.com
  138. mailing lists that links to the blog post.
  139. .. _the official Django development blog: https://www.djangoproject.com/weblog/
  140. If a reported issue is believed to be particularly time-sensitive --
  141. due to a known exploit in the wild, for example -- the time between
  142. advance notification and public disclosure may be shortened
  143. considerably.
  144. Additionally, if we have reason to believe that an issue reported to
  145. us affects other frameworks or tools in the Python/web ecosystem, we
  146. may privately contact and discuss those issues with the appropriate
  147. maintainers, and coordinate our own disclosure and resolution with
  148. theirs.
  149. The Django team also maintains an :doc:`archive of security issues
  150. disclosed in Django</releases/security>`.
  151. .. _Django's release team: https://www.djangoproject.com/foundation/teams/#releasers-team
  152. .. _security-notifications:
  153. Who receives advance notification
  154. =================================
  155. The full list of people and organizations who receive advance
  156. notification of security issues is not and will not be made public.
  157. We also aim to keep this list as small as effectively possible, in
  158. order to better manage the flow of confidential information prior to
  159. disclosure. As such, our notification list is *not* simply a list of
  160. users of Django, and being a user of Django is not sufficient reason
  161. to be placed on the notification list.
  162. In broad terms, recipients of security notifications fall into three
  163. groups:
  164. 1. Operating-system vendors and other distributors of Django who
  165. provide a suitably-generic (i.e., *not* an individual's personal
  166. email address) contact address for reporting issues with their
  167. Django package, or for general security reporting. In either case,
  168. such addresses **must not** forward to public mailing lists or bug
  169. trackers. Addresses which forward to the private email of an
  170. individual maintainer or security-response contact are acceptable,
  171. although private security trackers or security-response groups are
  172. strongly preferred.
  173. 2. On a case-by-case basis, individual package maintainers who have
  174. demonstrated a commitment to responding to and responsibly acting
  175. on these notifications.
  176. 3. On a case-by-case basis, other entities who, in the judgment of the
  177. Django development team, need to be made aware of a pending
  178. security issue. Typically, membership in this group will consist of
  179. some of the largest and/or most likely to be severely impacted
  180. known users or distributors of Django, and will require a
  181. demonstrated ability to responsibly receive, keep confidential and
  182. act on these notifications.
  183. .. admonition:: Security audit and scanning entities
  184. As a policy, we do not add these types of entities to the notification
  185. list.
  186. Requesting notifications
  187. ========================
  188. If you believe that you, or an organization you are authorized to
  189. represent, fall into one of the groups listed above, you can ask to be
  190. added to Django's notification list by emailing
  191. ``security@djangoproject.com``. Please use the subject line "Security
  192. notification request".
  193. Your request **must** include the following information:
  194. * Your full, real name and the name of the organization you represent,
  195. if applicable, as well as your role within that organization.
  196. * A detailed explanation of how you or your organization fit at least
  197. one set of criteria listed above.
  198. * A detailed explanation of why you are requesting security notifications.
  199. Again, please keep in mind that this is *not* simply a list for users of
  200. Django, and the overwhelming majority of users should subscribe to
  201. |django-announce| to receive advanced notice of when a security release will
  202. happen, without the details of the issues, rather than request detailed
  203. notifications.
  204. * The email address you would like to have added to our notification
  205. list.
  206. * An explanation of who will be receiving/reviewing mail sent to that
  207. address, as well as information regarding any automated actions that
  208. will be taken (i.e., filing of a confidential issue in a bug
  209. tracker).
  210. * For individuals, the ID of a public key associated with your address
  211. which can be used to verify email received from you and encrypt
  212. email sent to you, as needed.
  213. Once submitted, your request will be considered by the Django
  214. development team; you will receive a reply notifying you of the result
  215. of your request within 30 days.
  216. Please also bear in mind that for any individual or organization,
  217. receiving security notifications is a privilege granted at the sole
  218. discretion of the Django development team, and that this privilege can
  219. be revoked at any time, with or without explanation.
  220. .. admonition:: Provide all required information
  221. A failure to provide the required information in your initial contact
  222. will count against you when making the decision on whether or not to
  223. approve your request.