blob: d11f2700012ab921fe1a68d2940b186d9e7e2d57 [file] [log] [blame]
Alex Gaynor99b69d92013-10-19 17:52:58 -07001Security
2========
3
Ayrxffd8d432014-06-05 17:11:59 +08004We take the security of ``cryptography`` seriously. The following are a set of
5policies we have adopted to ensure that security issues are addressed in a
6timely fashion.
7
Alex Gaynor13e9a6f2017-08-23 16:46:55 -04008Infrastructure
9--------------
10
11In addition to ``cryptography``'s code, we're also concerned with the security
Lucia Lic6ba99d2021-11-08 22:06:11 +080012of the infrastructure we run (primarily ``cryptography.io``). If you discover
13a security vulnerability in our infrastructure, we ask you to report it using
14the same procedure.
Alex Gaynor13e9a6f2017-08-23 16:46:55 -040015
Alex Gaynor940c92f2016-02-19 06:34:39 -050016What is a security issue?
17-------------------------
18
19Anytime it's possible to write code using ``cryptography``'s public API which
Alex Gaynorebcd0372016-02-19 07:06:54 -050020does not provide the guarantees that a reasonable developer would expect it to
Alex Gaynor940c92f2016-02-19 06:34:39 -050021based on our documentation.
22
23That's a bit academic, but basically it means the scope of what we consider a
24vulnerability is broad, and we do not require a proof of concept or even a
25specific exploit, merely a reasonable threat model under which ``cryptography``
26could be attacked.
27
28To give a few examples of things we would consider security issues:
29
30* If a recipe, such as Fernet, made it easy for a user to bypass
31 confidentiality or integrity with the public API (e.g. if the API let a user
32 reuse nonces).
33* If, under any circumstances, we used a CSPRNG which wasn't fork-safe.
34* If ``cryptography`` used an API in an underlying C library and failed to
35 handle error conditions safely.
36
37Examples of things we wouldn't consider security issues:
38
Alex Gaynorf7721aa2016-02-19 07:11:03 -050039* Offering ECB mode for symmetric encryption in the *Hazmat* layer. Though ECB
40 is critically weak, it is documented as being weak in our documentation.
Alex Gaynor940c92f2016-02-19 06:34:39 -050041* Using a variable time comparison somewhere, if it's not possible to
42 articulate any particular program in which this would result in problematic
43 information disclosure.
44
45In general, if you're unsure, we request that you to default to treating things
46as security issues and handling them sensitively, the worst thing that can
Alex Gaynor9ef1d6f2017-03-24 21:03:15 -040047happen is that we'll ask you to file a public issue.
Alex Gaynor940c92f2016-02-19 06:34:39 -050048
Ayrxffd8d432014-06-05 17:11:59 +080049Reporting a security issue
50--------------------------
51
52We ask that you do not report security issues to our normal GitHub issue
53tracker.
54
55If you believe you've identified a security issue with ``cryptography``, please
Lucia Lic6ba99d2021-11-08 22:06:11 +080056report it to ``alex.gaynor@gmail.com`` and/or ``paul.l.kehrer@gmail.com``. You
57should verify that your MTA uses TLS to ensure the confidentiality of your
58message.
Alex Gaynor99b69d92013-10-19 17:52:58 -070059
Alex Gaynor9cd4b212014-01-10 06:54:21 -080060Once you've submitted an issue via email, you should receive an acknowledgment
Alex Gaynor99b69d92013-10-19 17:52:58 -070061within 48 hours, and depending on the action to be taken, you may receive
Alex Gaynor59075df2014-01-10 11:40:03 -080062further follow-up emails.
Ayrxffd8d432014-06-05 17:11:59 +080063
64Supported Versions
65------------------
66
67At any given time, we will provide security support for the `master`_ branch
Alex Gaynor940c92f2016-02-19 06:34:39 -050068as well as the most recent release.
Ayrxffd8d432014-06-05 17:11:59 +080069
Terry Chia81fed662014-07-07 11:25:51 +080070New releases for OpenSSL updates
71--------------------------------
72
Alex Gaynor56669aa2017-10-04 21:25:55 -040073As of versions 0.5, 1.0.1, and 2.0.0, ``cryptography`` statically links OpenSSL
Lucia Lic6ba99d2021-11-08 22:06:11 +080074in binary distributions for Windows, macOS, and Linux respectively, to ease
75installation. Due to this, ``cryptography`` will release a new version whenever
76OpenSSL has a security or bug fix release to avoid shipping insecure software.
Terry Chia81fed662014-07-07 11:25:51 +080077
78Like all our other releases, this will be announced on the mailing list and we
79strongly recommend that you upgrade as soon as possible.
80
Ayrxffd8d432014-06-05 17:11:59 +080081Disclosure Process
82------------------
83
Alex Gaynorb7114e92018-08-30 11:46:41 -040084When we become aware of a security bug in ``cryptography``, we will endeavor to
85fix it and issue a release as quickly as possible. We will generally issue a new
86release for any security issue.
Ayrxffd8d432014-06-05 17:11:59 +080087
Alex Gaynorb7114e92018-08-30 11:46:41 -040088The steps for issuing a security release are described in our
89:doc:`/doing-a-release` documentation.
Ayrxffd8d432014-06-05 17:11:59 +080090
Ayrxffd8d432014-06-05 17:11:59 +080091
92.. _`master`: https://github.com/pyca/cryptography