{"title":"Django’s security policies","version":"5.1","locale":"es","docname":"internals/security","url":"/es/5.1/internals/security/","canonical":"https://djangodocs.dev/es/5.1/internals/security/","summary":"Django’s development team is strongly committed to responsible reporting and disclosure of security-related issues. As such, we’ve adopted and follow a set of…","html":"<h1>Django’s security policies<a class=\"heading-anchor\" href=\"#django-s-security-policies\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>Django’s development team is strongly committed to responsible\nreporting and disclosure of security-related issues. As such, we’ve\nadopted and follow a set of policies which conform to that ideal and\nare geared toward allowing us to deliver timely security updates to\nthe official distribution of Django, as well as to third-party\ndistributions.</p>\n<section id=\"reporting-security-issues\">\n<span id=\"id1\"></span><h2>Reporting security issues<a class=\"heading-anchor\" href=\"#reporting-security-issues\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p><strong>Short version: please report security issues by emailing\nsecurity&#64;djangoproject.com</strong>.</p>\n<p>Most normal bugs in Django are reported to <a class=\"reference external\" href=\"https://code.djangoproject.com/query\">our public Trac instance</a>, but\ndue to the sensitive nature of security issues, we ask that they <strong>not</strong> be\npublicly reported in this fashion.</p>\n<p>Instead, if you believe you’ve found something in Django which has security\nimplications, please send a description of the issue via email to\n<code class=\"docutils literal notranslate\"><span class=\"pre\">security&#64;djangoproject.com</span></code>. Mail sent to that address reaches the <a class=\"reference external\" href=\"https://www.djangoproject.com/foundation/teams/#security-team\">security\nteam</a>.</p>\n<p>Once you’ve submitted an issue via email, you should receive an acknowledgment\nfrom a member of the security team within 3 working days. After that, the\nsecurity team will begin their analysis. Depending on the action to be taken,\nyou may receive followup emails. It can take several weeks before the security\nteam comes to a conclusion. There is no need to chase the security team unless\nyou discover new, relevant information. All reports aim to be resolved within\nthe industry-standard 90 days. Confirmed vulnerabilities with a\n<a class=\"reference internal\" href=\"#severity-levels\"><span class=\"std std-ref\">high severity level</span></a> will be addressed promptly.</p>\n<aside class=\"admonition-sending-encrypted-reports admonition\">\n<p class=\"admonition-title\">Sending encrypted reports</p>\n<p>If you want to send an encrypted email (<em>optional</em>), the public key ID for\n<code class=\"docutils literal notranslate\"><span class=\"pre\">security&#64;djangoproject.com</span></code> is <code class=\"docutils literal notranslate\"><span class=\"pre\">0xfcb84b8d1d17f80b</span></code>, and this public\nkey is available from most commonly-used keyservers.</p>\n</aside>\n<section id=\"reporting-guidelines\">\n<h3>Reporting guidelines<a class=\"heading-anchor\" href=\"#reporting-guidelines\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<section id=\"include-a-runnable-proof-of-concept\">\n<h4>Include a runnable proof of concept<a class=\"heading-anchor\" href=\"#include-a-runnable-proof-of-concept\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Please privately share a minimal Django project or code snippet that\ndemonstrates the potential vulnerability. Include clear instructions on how to\nset up, run, and reproduce the issue.</p>\n<p>Please do not attach screenshots of code.</p>\n</section>\n<section id=\"user-input-must-be-sanitized\">\n<h4>User input must be sanitized<a class=\"heading-anchor\" href=\"#user-input-must-be-sanitized\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Reports based on a failure to sanitize user input are not valid security\nvulnerabilities. It is the developer’s responsibility to properly handle user\ninput. This principle is explained in our <a class=\"reference internal\" href=\"/es/5.1/topics/security/#sanitize-user-input\"><span class=\"std std-ref\">security documentation</span></a>.</p>\n<p>For example, the following is <strong>not considered valid</strong> because <code class=\"docutils literal notranslate\"><span class=\"pre\">email</span></code> has\nnot been sanitized:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.core.mail</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">send_mail</span>\n<span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.http</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">JsonResponse</span>\n\n\n<span class=\"k\">def</span><span class=\"w\"> </span><span class=\"nf\">my_proof_of_concept</span><span class=\"p\">(</span><span class=\"n\">request</span><span class=\"p\">):</span>\n    <span class=\"n\">email</span> <span class=\"o\">=</span> <span class=\"n\">request</span><span class=\"o\">.</span><span class=\"n\">GET</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;email&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;&quot;</span><span class=\"p\">)</span>\n    <span class=\"n\">send_mail</span><span class=\"p\">(</span><span class=\"s2\">&quot;Email subject&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;Email body&quot;</span><span class=\"p\">,</span> <span class=\"n\">email</span><span class=\"p\">,</span> <span class=\"p\">[</span><span class=\"s2\">&quot;admin@example.com&quot;</span><span class=\"p\">])</span>\n    <span class=\"k\">return</span> <span class=\"n\">JsonResponse</span><span class=\"p\">(</span><span class=\"n\">status</span><span class=\"o\">=</span><span class=\"mi\">200</span><span class=\"p\">)</span>\n</code></pre></div>\n<p>Developers must <strong>always validate and sanitize input</strong> before using it. The\ncorrect approach would be to use a Django form to ensure <code class=\"docutils literal notranslate\"><span class=\"pre\">email</span></code> is properly\nvalidated:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">forms</span>\n<span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.core.mail</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">send_mail</span>\n<span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.http</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">JsonResponse</span>\n\n\n<span class=\"k\">class</span><span class=\"w\"> </span><span class=\"nc\">EmailForm</span><span class=\"p\">(</span><span class=\"n\">forms</span><span class=\"o\">.</span><span class=\"n\">Form</span><span class=\"p\">):</span>\n    <span class=\"n\">email</span> <span class=\"o\">=</span> <span class=\"n\">forms</span><span class=\"o\">.</span><span class=\"n\">EmailField</span><span class=\"p\">()</span>\n\n\n<span class=\"k\">def</span><span class=\"w\"> </span><span class=\"nf\">my_proof_of_concept</span><span class=\"p\">(</span><span class=\"n\">request</span><span class=\"p\">):</span>\n    <span class=\"n\">form</span> <span class=\"o\">=</span> <span class=\"n\">EmailForm</span><span class=\"p\">(</span><span class=\"n\">request</span><span class=\"o\">.</span><span class=\"n\">GET</span><span class=\"p\">)</span>\n    <span class=\"k\">if</span> <span class=\"n\">form</span><span class=\"o\">.</span><span class=\"n\">is_valid</span><span class=\"p\">():</span>\n        <span class=\"n\">send_mail</span><span class=\"p\">(</span>\n            <span class=\"s2\">&quot;Email subject&quot;</span><span class=\"p\">,</span>\n            <span class=\"s2\">&quot;Email body&quot;</span><span class=\"p\">,</span>\n            <span class=\"n\">form</span><span class=\"o\">.</span><span class=\"n\">cleaned_data</span><span class=\"p\">[</span><span class=\"s2\">&quot;email&quot;</span><span class=\"p\">],</span>\n            <span class=\"p\">[</span><span class=\"s2\">&quot;admin@example.com&quot;</span><span class=\"p\">],</span>\n        <span class=\"p\">)</span>\n        <span class=\"k\">return</span> <span class=\"n\">JsonResponse</span><span class=\"p\">(</span><span class=\"n\">status</span><span class=\"o\">=</span><span class=\"mi\">200</span><span class=\"p\">)</span>\n    <span class=\"k\">return</span> <span class=\"n\">JsonResponse</span><span class=\"p\">(</span><span class=\"n\">form</span><span class=\"o\">.</span><span class=\"n\">errors</span><span class=\"p\">,</span> <span class=\"n\">status</span><span class=\"o\">=</span><span class=\"mi\">400</span><span class=\"p\">)</span>\n</code></pre></div>\n<p>Similarly, as Django’s raw SQL constructs (such as <a class=\"reference internal\" href=\"/es/5.1/ref/models/querysets/#django.db.models.query.QuerySet.extra\" title=\"django.db.models.query.QuerySet.extra\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">extra()</span></code></a> and\n<a class=\"reference internal\" href=\"/es/5.1/ref/models/expressions/#django.db.models.expressions.RawSQL\" title=\"django.db.models.expressions.RawSQL\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">RawSQL</span></code></a> expression) provide developers with full control over the\nquery, they are insecure if user input is not properly handled. As explained in\nour <a class=\"reference internal\" href=\"/es/5.1/topics/security/#sql-injection-protection\"><span class=\"std std-ref\">security documentation</span></a>, it is the\ndeveloper’s responsibility to safely process user input for these functions.</p>\n<p>For instance, the following is <strong>not considered valid</strong> because <code class=\"docutils literal notranslate\"><span class=\"pre\">query</span></code> has\nnot been sanitized:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.shortcuts</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">HttpResponse</span>\n<span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">.models</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">MyModel</span>\n\n\n<span class=\"k\">def</span><span class=\"w\"> </span><span class=\"nf\">my_proof_of_concept</span><span class=\"p\">(</span><span class=\"n\">request</span><span class=\"p\">):</span>\n    <span class=\"n\">query</span> <span class=\"o\">=</span> <span class=\"n\">request</span><span class=\"o\">.</span><span class=\"n\">GET</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;query&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;&quot;</span><span class=\"p\">)</span>\n    <span class=\"n\">q</span> <span class=\"o\">=</span> <span class=\"n\">MyModel</span><span class=\"o\">.</span><span class=\"n\">objects</span><span class=\"o\">.</span><span class=\"n\">extra</span><span class=\"p\">(</span><span class=\"n\">select</span><span class=\"o\">=</span><span class=\"p\">{</span><span class=\"s2\">&quot;id&quot;</span><span class=\"p\">:</span> <span class=\"n\">query</span><span class=\"p\">})</span>\n    <span class=\"k\">return</span> <span class=\"n\">HttpResponse</span><span class=\"p\">(</span><span class=\"n\">q</span><span class=\"o\">.</span><span class=\"n\">values</span><span class=\"p\">())</span>\n</code></pre></div>\n</section>\n<section id=\"request-headers-and-urls-must-be-under-8k-bytes\">\n<h4>Request headers and URLs must be under 8K bytes<a class=\"heading-anchor\" href=\"#request-headers-and-urls-must-be-under-8k-bytes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>To prevent denial-of-service (DoS) attacks, production-grade servers impose\nlimits on request header and URL sizes. For example, by default Gunicorn allows\nup to roughly:</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference external\" href=\"https://docs.gunicorn.org/en/stable/settings.html#limit-request-line\">4k bytes for a URL</a></p></li>\n<li><p><a class=\"reference external\" href=\"https://docs.gunicorn.org/en/stable/settings.html#limit-request-field-size\">8K bytes for a request header</a></p></li>\n</ul>\n<p>Other web servers, such as Nginx and Apache, have similar restrictions to\nprevent excessive resource consumption.</p>\n<p>Consequently, the Django security team will not consider reports that rely on\nrequest headers or URLs exceeding 8K bytes, as such inputs are already\nmitigated at the server level in production environments.</p>\n<aside class=\"admonition-djadmin-runserver-should-never-be-used-in-production admonition\">\n<p class=\"admonition-title\"><a class=\"reference internal\" href=\"/es/5.1/ref/django-admin/#django-admin-runserver\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">runserver</span></code></a> should never be used in production</p>\n<p>Django’s built-in development server does not enforce these limits because\nit is not designed to be a production server.</p>\n</aside>\n</section>\n<section id=\"the-request-body-must-be-under-2-5-mb\">\n<h4>The request body must be under 2.5 MB<a class=\"heading-anchor\" href=\"#the-request-body-must-be-under-2-5-mb\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>The <a class=\"reference internal\" href=\"/es/5.1/ref/settings/#std-setting-DATA_UPLOAD_MAX_MEMORY_SIZE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATA_UPLOAD_MAX_MEMORY_SIZE</span></code></a> setting limits the default maximum\nrequest body size to 2.5 MB.</p>\n<p>As this is enforced on all production-grade Django projects by default, a proof\nof concept must not exceed 2.5 MB in the request body to be considered valid.</p>\n<p>Issues resulting from large, but potentially reasonable setting values, should\nbe reported using the <a class=\"reference external\" href=\"https://code.djangoproject.com/\">public ticket tracker</a> for hardening.</p>\n</section>\n<section id=\"code-under-test-must-feasibly-exist-in-a-django-project\">\n<h4>Code under test must feasibly exist in a Django project<a class=\"heading-anchor\" href=\"#code-under-test-must-feasibly-exist-in-a-django-project\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>The proof of concept must plausibly occur in a production-grade Django\napplication, reflecting real-world scenarios and following standard development\npractices.</p>\n<p>Django contains many private and undocumented functions that are not part of\nits public API. If a vulnerability depends on directly calling these internal\nfunctions in an unsafe way, it will not be considered a valid security issue.</p>\n</section>\n<section id=\"content-displayed-by-the-django-template-language-must-be-under-100-kb\">\n<h4>Content displayed by the Django Template Language must be under 100 KB<a class=\"heading-anchor\" href=\"#content-displayed-by-the-django-template-language-must-be-under-100-kb\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>The Django Template Language (DTL) is designed for building the content needed\nto display web pages. In particular its text filters are meant for that kind of\nusage.</p>\n<p>For reference, the complete works of Shakespeare have about 3.5 million bytes\nin plain-text ASCII encoding. Displaying such in a single request is beyond the\nscope of almost all websites, and so outside the scope of the DTL too.</p>\n<p>Text processing is expensive. Django makes no guarantee that DTL text filters\nare never subject to degraded performance if passed deliberately crafted,\nsufficiently large inputs. Under default configurations, Django makes it\ndifficult for sites to accidentally accept such payloads from untrusted\nsources, but, if it is necessary to display large amounts of user-provided\ncontent, it’s important that basic security measures are taken.</p>\n<p>User-provided content should always be constrained to known maximum length. It\nshould be filtered to remove malicious content, and validated to match expected\nformats. It should then be processed offline, if necessary, before being\ndisplayed.</p>\n<p>Proof of concepts which use over 100 KB of data to be processed by the DTL will\nbe considered invalid.</p>\n</section>\n</section>\n</section>\n<section id=\"how-does-django-evaluate-a-report\">\n<span id=\"security-report-evaluation\"></span><h2>How does Django evaluate a report<a class=\"heading-anchor\" href=\"#how-does-django-evaluate-a-report\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>These are criteria used by the security team when evaluating whether a report\nrequires a security release:</p>\n<ul class=\"simple\">\n<li><p>The vulnerability is within a <a class=\"reference internal\" href=\"#security-support\"><span class=\"std std-ref\">supported version</span></a> of\nDjango.</p></li>\n<li><p>The vulnerability does not depend on manual actions that rely on code\nexternal to Django. This includes actions performed by a project’s developer\nor maintainer using developer tools or the Django CLI. For example, attacks\nthat require running management commands with uncommon or insecure options\ndo not qualify.</p></li>\n<li><p>The vulnerability applies to a production-grade Django application. This\nmeans the following scenarios do not require a security release:</p>\n<ul>\n<li><p>Exploits that only affect local development, for example when using\n<a class=\"reference internal\" href=\"/es/5.1/ref/django-admin/#django-admin-runserver\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">runserver</span></code></a>.</p></li>\n<li><p>Exploits which fail to follow security best practices, such as failure to\nsanitize user input. For other examples, see our <a class=\"reference internal\" href=\"/es/5.1/topics/security/#cross-site-scripting\"><span class=\"std std-ref\">security\ndocumentation</span></a>.</p></li>\n<li><p>Exploits in AI generated code that do not adhere to security best practices.</p></li>\n</ul>\n</li>\n</ul>\n<p>The security team may conclude that the source of the vulnerability is within\nthe Python standard library, in which case the reporter will be asked to report\nthe vulnerability to the Python core team. For further details see the <a class=\"reference external\" href=\"https://www.python.org/dev/security/\">Python\nsecurity guidelines</a>.</p>\n<p>On occasion, a security release may be issued to help resolve a security\nvulnerability within a popular third-party package. These reports should come\nfrom the package maintainers.</p>\n<p>If you are unsure whether your finding meets these criteria, please still report\nit <a class=\"reference internal\" href=\"#reporting-security-issues\"><span class=\"std std-ref\">privately by emailing security&#64;djangoproject.com</span></a>. The security team will review your report and\nrecommend the correct course of action.</p>\n</section>\n<section id=\"supported-versions\">\n<span id=\"security-support\"></span><h2>Supported versions<a class=\"heading-anchor\" href=\"#supported-versions\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>At any given time, the Django team provides official security support\nfor several versions of Django:</p>\n<ul class=\"simple\">\n<li><p>The <a class=\"reference external\" href=\"https://github.com/django/django/\">main development branch</a>, hosted on GitHub, which will become the\nnext major release of Django, receives security support. Security issues that\nonly affect the main development branch and not any stable released versions\nare fixed in public without going through the <a class=\"reference internal\" href=\"#security-disclosure\"><span class=\"std std-ref\">disclosure process</span></a>.</p></li>\n<li><p>The two most recent Django release series receive security\nsupport. For example, during the development cycle leading to the\nrelease of Django 1.5, support will be provided for Django 1.4 and\nDjango 1.3. Upon the release of Django 1.5, Django 1.3’s security\nsupport will end.</p></li>\n<li><p><a class=\"reference internal\" href=\"/es/5.1/internals/release-process/#term-Long-term-support-release\"><span class=\"xref std std-term\">Long-term support release</span></a>s will receive security updates for a\nspecified period.</p></li>\n</ul>\n<p>When new releases are issued for security reasons, the accompanying\nnotice will include a list of affected versions. This list is\ncomprised solely of <em>supported</em> versions of Django: older versions may\nalso be affected, but we do not investigate to determine that, and\nwill not issue patches or new releases for those versions.</p>\n</section>\n<section id=\"security-issue-severity-levels\">\n<span id=\"severity-levels\"></span><h2>Security issue severity levels<a class=\"heading-anchor\" href=\"#security-issue-severity-levels\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>The severity level of a security vulnerability is determined by the attack\ntype.</p>\n<p>Severity levels are:</p>\n<ul class=\"simple\">\n<li><p><strong>High</strong></p>\n<ul>\n<li><p>Remote code execution</p></li>\n<li><p>SQL injection</p></li>\n</ul>\n</li>\n<li><p><strong>Moderate</strong></p>\n<ul>\n<li><p>Cross site scripting (XSS)</p></li>\n<li><p>Cross site request forgery (CSRF)</p></li>\n<li><p>Denial-of-service attacks</p></li>\n<li><p>Broken authentication</p></li>\n</ul>\n</li>\n<li><p><strong>Low</strong></p>\n<ul>\n<li><p>Sensitive data exposure</p></li>\n<li><p>Broken session management</p></li>\n<li><p>Unvalidated redirects/forwards</p></li>\n<li><p>Issues requiring an uncommon configuration option</p></li>\n</ul>\n</li>\n</ul>\n</section>\n<section id=\"how-django-discloses-security-issues\">\n<span id=\"security-disclosure\"></span><h2>How Django discloses security issues<a class=\"heading-anchor\" href=\"#how-django-discloses-security-issues\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Our process for taking a security issue from private discussion to\npublic disclosure involves multiple steps.</p>\n<p>Approximately one week before public disclosure, we send two notifications:</p>\n<p>First, we notify <a class=\"reference internal\" href=\"/es/5.1/internals/mailing-lists/#django-announce-mailing-list\"><span class=\"std std-ref\">django-announce</span></a> of the date and approximate time of the\nupcoming security release, as well as the severity of the issues. This is to\naid organizations that need to ensure they have staff available to handle\ntriaging our announcement and upgrade Django as needed.</p>\n<p>Second, we notify a list of <a class=\"reference internal\" href=\"#security-notifications\"><span class=\"std std-ref\">people and organizations</span></a>, primarily composed of operating-system vendors and\nother distributors of Django. This email is signed with the PGP key of someone\nfrom <a class=\"reference external\" href=\"https://www.djangoproject.com/foundation/teams/#releasers-team\">Django’s release team</a> and consists of:</p>\n<ul class=\"simple\">\n<li><p>A full description of the issue and the affected versions of Django.</p></li>\n<li><p>The steps we will be taking to remedy the issue.</p></li>\n<li><p>The patch(es), if any, that will be applied to Django.</p></li>\n<li><p>The date on which the Django team will apply these patches, issue\nnew releases and publicly disclose the issue.</p></li>\n</ul>\n<p>On the day of disclosure, we will take the following steps:</p>\n<ol class=\"arabic simple\">\n<li><p>Apply the relevant patch(es) to Django’s codebase.</p></li>\n<li><p>Issue the relevant release(s), by placing new packages on the <a class=\"extlink-pypi reference external\" href=\"https://pypi.org/project/Django/\">Python\nPackage Index</a> and on the <a class=\"reference external\" href=\"https://www.djangoproject.com/download/\">djangoproject.com website</a>, and tagging the new release(s)\nin Django’s git repository.</p></li>\n<li><p>Post a public entry on <a class=\"reference external\" href=\"https://www.djangoproject.com/weblog/\">the official Django development blog</a>,\ndescribing the issue and its resolution in detail, pointing to the\nrelevant patches and new releases, and crediting the reporter of\nthe issue (if the reporter wishes to be publicly identified).</p></li>\n<li><p>Post a notice to the <a class=\"reference internal\" href=\"/es/5.1/internals/mailing-lists/#django-announce-mailing-list\"><span class=\"std std-ref\">django-announce</span></a> and <a class=\"reference external\" href=\"mailto:oss-security&#37;&#52;&#48;lists&#46;openwall&#46;com\">oss-security<span>&#64;</span>lists<span>&#46;</span>openwall<span>&#46;</span>com</a>\nmailing lists that links to the blog post.</p></li>\n</ol>\n<p>If a reported issue is believed to be particularly time-sensitive –\ndue to a known exploit in the wild, for example – the time between\nadvance notification and public disclosure may be shortened\nconsiderably.</p>\n<p>Additionally, if we have reason to believe that an issue reported to\nus affects other frameworks or tools in the Python/web ecosystem, we\nmay privately contact and discuss those issues with the appropriate\nmaintainers, and coordinate our own disclosure and resolution with\ntheirs.</p>\n<p>The Django team also maintains an <a class=\"reference internal\" href=\"/es/5.1/releases/security/\"><span class=\"doc\">archive of security issues\ndisclosed in Django</span></a>.</p>\n</section>\n<section id=\"who-receives-advance-notification\">\n<span id=\"security-notifications\"></span><h2>Who receives advance notification<a class=\"heading-anchor\" href=\"#who-receives-advance-notification\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>The full list of people and organizations who receive advance\nnotification of security issues is not and will not be made public.</p>\n<p>We also aim to keep this list as small as effectively possible, in\norder to better manage the flow of confidential information prior to\ndisclosure. As such, our notification list is <em>not</em> simply a list of\nusers of Django, and being a user of Django is not sufficient reason\nto be placed on the notification list.</p>\n<p>In broad terms, recipients of security notifications fall into three\ngroups:</p>\n<ol class=\"arabic simple\">\n<li><p>Operating-system vendors and other distributors of Django who\nprovide a suitably-generic (i.e., <em>not</em> an individual’s personal\nemail address) contact address for reporting issues with their\nDjango package, or for general security reporting. In either case,\nsuch addresses <strong>must not</strong> forward to public mailing lists or bug\ntrackers. Addresses which forward to the private email of an\nindividual maintainer or security-response contact are acceptable,\nalthough private security trackers or security-response groups are\nstrongly preferred.</p></li>\n<li><p>On a case-by-case basis, individual package maintainers who have\ndemonstrated a commitment to responding to and responsibly acting\non these notifications.</p></li>\n<li><p>On a case-by-case basis, other entities who, in the judgment of the\nDjango development team, need to be made aware of a pending\nsecurity issue. Typically, membership in this group will consist of\nsome of the largest and/or most likely to be severely impacted\nknown users or distributors of Django, and will require a\ndemonstrated ability to responsibly receive, keep confidential and\nact on these notifications.</p></li>\n</ol>\n<aside class=\"admonition-security-audit-and-scanning-entities admonition\">\n<p class=\"admonition-title\">Security audit and scanning entities</p>\n<p>As a policy, we do not add these types of entities to the notification\nlist.</p>\n</aside>\n</section>\n<section id=\"requesting-notifications\">\n<h2>Requesting notifications<a class=\"heading-anchor\" href=\"#requesting-notifications\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>If you believe that you, or an organization you are authorized to\nrepresent, fall into one of the groups listed above, you can ask to be\nadded to Django’s notification list by emailing\n<code class=\"docutils literal notranslate\"><span class=\"pre\">security&#64;djangoproject.com</span></code>. Please use the subject line «Security\nnotification request».</p>\n<p>Your request <strong>must</strong> include the following information:</p>\n<ul class=\"simple\">\n<li><p>Your full, real name and the name of the organization you represent,\nif applicable, as well as your role within that organization.</p></li>\n<li><p>A detailed explanation of how you or your organization fit at least\none set of criteria listed above.</p></li>\n<li><p>A detailed explanation of why you are requesting security notifications.\nAgain, please keep in mind that this is <em>not</em> simply a list for users of\nDjango, and the overwhelming majority of users should subscribe to\n<a class=\"reference internal\" href=\"/es/5.1/internals/mailing-lists/#django-announce-mailing-list\"><span class=\"std std-ref\">django-announce</span></a> to receive advanced notice of when a security release will\nhappen, without the details of the issues, rather than request detailed\nnotifications.</p></li>\n<li><p>The email address you would like to have added to our notification\nlist.</p></li>\n<li><p>An explanation of who will be receiving/reviewing mail sent to that\naddress, as well as information regarding any automated actions that\nwill be taken (i.e., filing of a confidential issue in a bug\ntracker).</p></li>\n<li><p>For individuals, the ID of a public key associated with your address\nwhich can be used to verify email received from you and encrypt\nemail sent to you, as needed.</p></li>\n</ul>\n<p>Once submitted, your request will be considered by the Django\ndevelopment team; you will receive a reply notifying you of the result\nof your request within 30 days.</p>\n<p>Please also bear in mind that for any individual or organization,\nreceiving security notifications is a privilege granted at the sole\ndiscretion of the Django development team, and that this privilege can\nbe revoked at any time, with or without explanation.</p>\n<aside class=\"admonition-provide-all-required-information admonition\">\n<p class=\"admonition-title\">Provide all required information</p>\n<p>A failure to provide the required information in your initial contact\nwill count against you when making the decision on whether or not to\napprove your request.</p>\n</aside>\n</section>","rootId":"django-s-security-policies","toc":[{"title":"Reporting security issues","anchor":"reporting-security-issues","children":[{"title":"Reporting guidelines","anchor":"reporting-guidelines","children":[{"title":"Include a runnable proof of concept","anchor":"include-a-runnable-proof-of-concept","children":[]},{"title":"User input must be sanitized","anchor":"user-input-must-be-sanitized","children":[]},{"title":"Request headers and URLs must be under 8K bytes","anchor":"request-headers-and-urls-must-be-under-8k-bytes","children":[]},{"title":"The request body must be under 2.5 MB","anchor":"the-request-body-must-be-under-2-5-mb","children":[]},{"title":"Code under test must feasibly exist in a Django project","anchor":"code-under-test-must-feasibly-exist-in-a-django-project","children":[]},{"title":"Content displayed by the Django Template Language must be under 100 KB","anchor":"content-displayed-by-the-django-template-language-must-be-under-100-kb","children":[]}]}]},{"title":"How does Django evaluate a report","anchor":"how-does-django-evaluate-a-report","children":[]},{"title":"Supported versions","anchor":"supported-versions","children":[]},{"title":"Security issue severity levels","anchor":"security-issue-severity-levels","children":[]},{"title":"How Django discloses security issues","anchor":"how-django-discloses-security-issues","children":[]},{"title":"Who receives advance notification","anchor":"who-receives-advance-notification","children":[]},{"title":"Requesting notifications","anchor":"requesting-notifications","children":[]}],"breadcrumbs":[{"docname":"internals/index","title":"Django internals","url":"/es/5.1/internals/"}],"prev":{"docname":"internals/organization","title":"Organización del Proyecto Django","url":"/es/5.1/internals/organization/"},"next":{"docname":"internals/release-process","title":"Django’s release process","url":"/es/5.1/internals/release-process/"},"formats":{"html":"/es/5.1/internals/security/","markdown":"/es/5.1/internals/security.md","json":"/es/5.1/internals/security.json"},"source":"https://github.com/django/django/blob/stable/5.1.x/docs/internals/security.txt","official":"https://docs.djangoproject.com/es/5.1/internals/security/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11","1.10","1.9"],"inLocales":["en","zh-hans","fr","ja","id","it","pt-br","ko","es","el","pl"]}