Vulnerabilities in pkg:pypi/channels
PACKAGECVE-2020-35681 is a HIGH (CVSS 7.4) django channels leakage of session vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Channels libraries in the PyPI ecosystem. The issue involves django channels leakage of session identifiers using legacy asgihandler. Remediation is available by upgrading affected packages to version 3.0.3.
pkg:pypi/channels
Vulnerability advisories affecting package pkg:pypi/channels. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-v542-8q9x-cffc | CVE-2020-35681 | HIGH | Django Channels leakage of session identifiers using legacy AsgiHandler |
CVE-2020-35681 at a Glance
Security Impact
CVSS: 7.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H).
How to Fix CVE-2020-35681
To remediate this vulnerability, upgrade all affected Channels dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install channels>=3.0.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show channels
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2020-35681, inspect your installed packages using pip:
pip show channels
Analyze the terminal output to locate any version of Channels in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.3), your application is affected.
Note: The pip show channels command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Channels, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-35681 Affected Channels Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
channels
|
PyPI |
≥ 3.0.0
< 3.0.3
|
3.0.3
|
References
Frequently Asked Questions
What is CVE-2020-35681?
Which Channels versions are affected?
What version fixes CVE-2020-35681?
Is channels affected?
What is the CVSS score of CVE-2020-35681?
What CWE is associated with CVE-2020-35681?
How can I check PyPI dependencies for CVE-2020-35681?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v542-8q9x-cffc",
"modified" : "2024-09-13T17:49:26Z",
"published" : "2021-03-19T21:29:02Z",
"aliases" : [ "CVE-2020-35681" ],
"summary" : "Django Channels leakage of session identifiers using legacy AsgiHandler",
"details" : "Django Channels 3.x before 3.0.3 allows remote attackers to obtain sensitive information from a different request scope. The legacy channels.http.AsgiHandler class, used for handling HTTP type requests in an ASGI environment prior to Django 3.0, did not correctly separate request scopes in Channels 3.0. In many cases this would result in a crash but, with correct timing, responses could be sent to the wrong client, resulting in potential leakage of session identifiers and other sensitive data. Note that this affects only the legacy Channels provided class, and not Django's similar ASGIHandler, available from Django 3.0.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "channels"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-35681"
}, {
"type" : "WEB",
"url" : "https://github.com/django/channels/commit/e85874d9630474986a6937430eac52db79a2a022"
}, {
"type" : "WEB",
"url" : "https://channels.readthedocs.io/en/stable/releases/3.0.3.html"
}, {
"type" : "WEB",
"url" : "https://channels.readthedocs.io/en/stable/releases/index.html"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-v542-8q9x-cffc"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/django/channels"
}, {
"type" : "WEB",
"url" : "https://github.com/django/channels/releases"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/channels/PYSEC-2021-113.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-03-13T00:47:11Z",
"nvd_published_at" : "2021-02-22T03:15:00Z"
}
}