# Django: has_vary_header may expose cached responses when Vary values contain whitespace

Advisory record · `GHSA-923m-gv2p-w5qp`

- **Identifiers:** `GHSA-923m-gv2p-w5qp` · `BIT-django-2026-48587` · `CVE-2026-48587` · `PYSEC-2026-198`
- **State:** Confirmed
- **Severity:** CVSS 2.3 Low
- **Critical:** No
- **Weakness (CWE):** [CWE-1023](https://cwe.mitre.org/data/definitions/1023.html)
- **Tags:** [CWE-1023](https://agentprime.io/advisories/tag/cwe-1023.md)
- **Published:** 3 Jun 2026
- **Updated:** 10 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 3 Jun 2026, 15:30 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `django` (PyPI): affected `<5.2.15 || >=6.0.0, <6.0.6`; fixed in `5.2.15`, `6.0.6`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Django versions 5.2 before 5.2.15 and 6.0 before 6.0.6 are vulnerable. The function has_vary_header() does not strip leading or trailing whitespace from Vary header values before comparing them, so a remote attacker can read cached responses for URLs whose responses contain whitespace-padded Vary values. Upgrade to Django 5.2.15 or 6.0.6. Earlier, unsupported series were not evaluated and may also be affected.

Written 4 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 2.3 Low, CVSS 4.0: `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N`, from CNA (DSF)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0037, the 30th percentile, on 5 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:29 UTC: First seen by agentprime
- 31 Oct 2026, 14:29 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-923m-gv2p-w5qp)

## Sources

- [GitHub Advisory Database: GHSA-923m-gv2p-w5qp](https://github.com/advisories/GHSA-923m-gv2p-w5qp)
- [OSV: GHSA-923m-gv2p-w5qp](https://osv.dev/vulnerability/GHSA-923m-gv2p-w5qp)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-48587>
- <https://github.com/django/django/commit/1721035a72624aad7b38dd19b14013efd94b24b8>
- <https://github.com/django/django/commit/42aa0b3364d312e7c6472258d8b0e9c0277fbf22>
- <https://github.com/django/django/commit/9b62b0af71a14c657d19d95371630ba839e83d9a>
- <https://docs.djangoproject.com/en/dev/releases/security>
- <https://github.com/django/django>
- <https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2026-198.yaml>
- <https://groups.google.com/g/django-announce>
- <https://www.djangoproject.com/weblog/2026/jun/03/security-releases>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-923m-gv2p-w5qp>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-923m-gv2p-w5qp/>. Everything for agents: <https://agentprime.io/llms.txt>.
