1- =========================
2- Security and threat model
3- =========================
1+ ========
2+ Security
3+ ========
44
5- The majority of Python Security Response Team (PSRT)
6- members are volunteers. Therefore, you must respect this volunteered time
7- by following this security policy. Repeated failure to
8- respect the security policy will result in future reports
9- being rejected or being banned from the ` python ` GitHub organization, regardless of technical merit.
5+ Python Security Response Team (PSRT) members balance this work against
6+ many other responsibilities. Please be thoughtful about the time and attention
7+ your report requires. Repeated failure to respect the security policy will
8+ result in future reports being rejected or being banned from the `` python ``
9+ GitHub organization, regardless of technical merit.
1010
1111What types of bugs are vulnerabilities?
1212---------------------------------------
@@ -15,6 +15,9 @@ Not all bugs are vulnerabilities. To avoid causing
1515duplicate work for PSRT members all potential reports
1616must be evaluated against the relevant threat models
1717prior to being submitted to the PSRT.
18+ Where possible, cite the relevant threat model to show that
19+ the threat model has been considered while determining whether
20+ to report a bug as a vulnerability.
1821
1922Vulnerabilities must be exploitable from code, configurations,
2023pre-conditions, and deployments that might feasibly exist in
@@ -23,21 +26,16 @@ that does not make sense in a production program
2326will not be accepted as a vulnerability.
2427
2528Documented functionality will not be considered a vulnerability.
26- For example, :mod: `pickle `, :mod: `marshal` ` , :mod: `shelve` ` , :mod: `eval` `,
29+ For example, :mod: `pickle `, :mod: `marshal `, :mod: `shelve `, :mod: `eval `,
2730and :mod: `exec ` are documented to execute arbitrary Python code that is supplied
28- as data. The :mod: `ctypes ` module is documented to enable modifying arbitrary locations in memory.
31+ as data. The :mod: `ctypes ` module is documented to enable modifying arbitrary
32+ locations in memory.
2933
30- Vulnerabilities must not depend on malicious control of:
31-
32- * what Python code is executed by the interpreter
33- * locations where code is loaded prior to execution (such as current working
34- directory, ``PYTHONPATH ``)
35- * configuration files
36- * environment variables
37- * command line options
38- * installed packages or modules
39- * `.pth files <https://docs.python.org/3/library/site.html >`__
40- * caches or ``.pyc `` files
34+ Vulnerabilities must not depend on malicious control of Python's launch
35+ conditions, including command line arguments, environment variables, or
36+ modifications to files on the target system. We assume that, at the time Python
37+ is executed, the environment is as intended by the legitimate user, and any
38+ malicious variation from this cannot be mitigated by Python itself.
4139
4240Vulnerabilities that affect availability (such as DoS, ReDoS) must be
4341triggerable with data inputs that are reasonably sized for the use-case.
@@ -48,35 +46,32 @@ This is to avoid handling performance improvements as security vulnerabilities.
4846Vulnerabilities in dependencies of Python (such as zlib, Tcl/Tk, or OpenSSL)
4947are not vulnerabilities in Python unless Python's use of the dependency
5048interferes with secure use of the dependency.
51- For example, Python is not vulnerable because it bundles a vulnerable
52- version of zlib, users are expected to upgrade their own dependencies.
53-
54- The complete threat model for Python and standard library modules
55- is available in the Threat Model section of the Python Developer Guide.
49+ For example, a vulnerability in the bundled copy of zlib in Python is a
50+ vulnerability in zlib, not Python.
5651
5752What versions of Python are accepting reports?
5853----------------------------------------------
5954
6055Python accepts security vulnerabilities and will
61- assign CVE IDs for `supported Python versions `_ that have a status of
62- `"bugfix" or "security" <python-status >`_. Versions that are not yet
63- stable (status of `"feature" or "prerelease" <python-status >`_) are not
64- eligible for CVE IDs. If the vulnerability exclusively exists in
65- non-stable versions, then the issue should be handled as a public bug issue.
56+ assign CVE IDs for `supported Python versions <branchstatus >`_ that have a status of
57+ `"bugfix" or "security" <version-status-key >`_. Versions that are not yet
58+ stable (status of `"feature" or "prerelease" <version-status-key >`_) are not
59+ eligible for CVE IDs. If the vulnerability only exists in prerelease versions
60+ (alphas, betas, release candidates), then the issue should be reported as a
61+ regular bug.
62+ Prior to submitting a report, check whether the issue has already been
63+ resolved on the ``main `` branch and only requires backporting.
6664
6765Sometimes features may be marked as
6866"experimental" in Python, even in a stable Python version.
6967These features are not eligible for security vulnerabilities.
7068Instead open a public GitHub issue.
7169
7270If a vulnerability is platform-dependent, check if the platform is
73- ` supported per :pep: `11 `.
71+ supported per :pep: `11 `.
7472Vulnerabilities that exclusively affect unsupported platforms
7573may not be accepted.
7674
77- .. _supported Python versions : https://devguide.python.org/versions/
78- .. _python-status : https://devguide.python.org/versions/#status-key
79-
8075What to include and how to structure a vulnerability report?
8176------------------------------------------------------------
8277
@@ -87,7 +82,9 @@ be formatted correctly:
8782* For the initial report and follow-up communications, avoid
8883 overly long, verbose, or excessive structure (such as headers or tables).
8984 Ideally reports should be a few sentences describing the vulnerability and
90- a proof-of-concept script that reproduces the issue.
85+ a proof-of-concept script that reproduces the issue and provides a clear
86+ indication whether the vulnerability is still present (such as exiting with
87+ ``1 `` if vulnerable and ``0 `` if not vulnerable).
9188* When reporting large numbers or "batches" of vulnerabilities or
9289 searching for potential vulnerabilities using an LLM, you as a reporter must
9390 verify the validity of all reports prior to submission to the PSRT.
@@ -124,7 +121,7 @@ Here's what to expect for how a vulnerability report will be handled:
124121 the advisory and CVE record will be published with attribution.
125122
126123For more information about how the PSRT handles vulnerabilities,
127- `consult the Python Developer Guide <https://devguide.python.org/developer-workflow/ psrt/#triaging-a- vulnerability-report >`__.
124+ `consult the Python Developer Guide <psrt- vulnerability-process >`__.
128125
129126PSF Code of Conduct
130127-------------------
0 commit comments