# CVE-2020-5224: Session key exposure through session list in Django User Sessions

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.5
- **CVSS:** 6.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: Low; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.53% (percentile 38, 2026-11-26)
- **CWE:** CWE-287
- **Aliases:** GHSA-5fq8-3q2f-4m5g, PYSEC-2020-230
- **Published:** 2020-01-24T19:56:59.000Z
- **Modified:** 2026-07-08T06:00:27.818Z

## Who should check

- Projects that depend on PyPI package django-user-sessions (\< 1.7.1)
- Anyone running Jazzband django-user-sessions \< 1.7.1

## Description

In Django User Sessions (django-user-sessions) before 1.7.1, the views provided allow users to terminate specific sessions. The session key is used to identify sessions, and thus included in the rendered HTML. In itself this is not a problem. However if the website has an XSS vulnerability, the session key could be extracted by the attacker and a session takeover could happen.

## Affected and fixed versions

- PyPI `django-user-sessions`: affected \< 1.7.1; fixed 1.7.1 (osv)
- Jazzband django-user-sessions: \< 1.7.1 (cvelist)

## Mitigation

- Upgrade django-user-sessions to 1.7.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2020-5224. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2020-5224.md
Affected: django-user-sessions < 1.7.1
Fixed in: 1.7.1

Steps:
1. Search this machine and project for django-user-sessions (PyPI), Jazzband django-user-sessions: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2020-5224 being exploited?

There is no confirmed exploitation: CVE-2020-5224 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.53% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2020-5224?

Medium: CVSS 6.5 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2020-5224?

django-user-sessions \< 1.7.1.

### Is there a fix for CVE-2020-5224?

Yes. Fixed in 1.7.1. Upgrade django-user-sessions to 1.7.1 or later.

### How do I check if I'm affected by CVE-2020-5224?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/Bouke/django-user-sessions/security/advisories/GHSA-5fq8-3q2f-4m5g>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2020-5224>
- patch: <https://github.com/jazzband/django-user-sessions/commit/f0c4077e7d1436ba6d721af85cee89222ca5d2d9>
- other: <https://github.com/Bouke/django-user-sessions>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/django-user-sessions/PYSEC-2020-230.yaml>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2020-5224>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-5fq8-3q2f-4m5g> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2020-230> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2020-5224> · JSON: <https://flawdb.com/api/v1/entries/CVE-2020-5224>
