{"id":"CVE-2026-54625","aliases":["CVE-2026-54625","GHSA-fwjf-m4qw-9f2x","PYSEC-2026-3824"],"related":[],"kind":"vulnerability","state":"published","title":"django CMS: Page cache ignores plugin-declared Vary headers (disclosure & poisoning)","summary":"django CMS is a content management system powered by Django. Prior to 5.0.8 and in 5.1.0a1, the django CMS page cache in cms/cache/page.py ignores request headers declared by plugins through get_vary_cache_on(). The _page_cache_key function includes the cache prefix, site, language, path, and timezone but not the declared header values. Although set_page_cache adds those names to the response Vary header, get_page_cache retrieves the first stored variant under the same header-agnostic key. When CMS_PAGE_CACHE is enabled and a plugin varies content on a header such as Country-Code, one visitor can receive another visitor’s request-specific content, and an unauthenticated attacker can prime the cache with attacker-chosen content. This issue is fixed in versions 5.0.8 and 5.1.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"django CMS is a content management system powered by Django. Prior to 5.0.8 and in 5.1.0a1, the django CMS page cache in cms/cache/page.py ignores request headers declared by plugins through get_vary_cache_on(). The _page_cache_key function includes the cache prefix, site, language, path, and timezone but not the declared header values. Although set_page_cache adds those names to the response Vary header, get_page_cache retrieves the first stored variant under the same header-agnostic key. When CMS_PAGE_CACHE is enabled and a plugin varies content on a header such as Country-Code, one visitor can receive another visitor’s request-specific content, and an unauthenticated attacker can prime the cache with attacker-chosen content. This issue is fixed in versions 5.0.8 and 5.1.0.","source":"cvelist"},{"lang":"en","text":"### Summary\nThe CMS page cache key ignores the request headers that plugins declare via `get_vary_cache_on()`. The header is added to the response `Vary` header, but the CMS's own cache key does not incorporate the header values, so the first visitor's variant is served to all subsequent visitors regardless of their header values.\n\n### Details\n`_page_cache_key` (in `cms/cache/page.py`) keys only on cache prefix, site, language, path and timezone. `set_page_cache` collects the plugin-declared vary headers and calls `patch_vary_headers(response, ...)` (affecting only the emitted `Vary` header), but stores and retrieves the cached page under the header-agnostic key. `get_page_cache` therefore returns whichever variant was cached first.\n\n### Impact\n- **Information disclosure:** when a plugin varies its output on a request  header (e.g. `Country-Code`), the variant rendered for the first anonymous visitor is served to everyone until the entry expires, leaking request-specific content across users.\n- **Cache poisoning:** an unauthenticated attacker can prime the anonymous page cache with content rendered from attacker-chosen header values, which is then served to subsequent visitors.\n\nApplies only when `CMS_PAGE_CACHE` is enabled and at least one plugin implements `get_vary_cache_on()`.\n\n### Patches\nFixed in 5.0.8: the page cache now folds the request's values implements `get_vary_cache_on()`.\n\n### Patches\nFixed in 5.0.8: the page cache now folds the request's values for plugin-declared vary headers into the content key. The set of vary headers is persisted on write and looked up first on read (mirroring Django's  `learn_cache_key`/`get_cache_key`); a missing header-list entry degrades to a cache miss, never a wrong-variant hit.\n\n### Workarounds\nDisable `CMS_PAGE_CACHE`, or avoid plugins that rely on `get_vary_cache_on()`, until upgraded.\n\n### Credits\nReported by the security team at the University of Sydney ([@reporter]).","format":"markdown","source":"ghsa"},{"lang":"es","text":"django CMS es un sistema de gestión de contenido impulsado por Django. Antes de la versión 5.0.8 y en la 5.1.0a1, la caché de página de django CMS en cms/cache/page.py ignora los encabezados de solicitud declarados por los plugins a través de get_vary_cache_on(). La función _page_cache_key incluye el prefijo de caché, el sitio, el idioma, la ruta y la zona horaria, pero no los valores de encabezado declarados. Aunque set_page_cache añade esos nombres al encabezado Vary de la respuesta, get_page_cache recupera la primera variante almacenada bajo la misma clave agnóstica de encabezado. Cuando CMS_PAGE_CACHE está habilitado y un plugin varía el contenido en un encabezado como Country-Code, un visitante puede recibir contenido específico de la solicitud de otro visitante, y un atacante no autenticado puede cebar la caché con contenido elegido por el atacante. Este problema se soluciona en las versiones 5.0.8 y 5.1.0.","source":"nvd"}],"published":"2026-08-20T17:58:03.255Z","modified":"2026-10-26T10:10:00.140Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"}],"cwes":["CWE-349","CWE-524"],"affected":[{"ranges":[{"version":"< 5.0.8","status":"affected"},{"version":">= 5.1.0a1, < 5.1.0","status":"affected"}],"vendor":"django-cms","product":"django-cms","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.0.8"}],"ecosystem":"PyPI","package":"django-cms","purl":"pkg:pypi/django-cms","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.0.8"}],"ecosystem":"PyPI","package":"django-cms","purl":"pkg:pypi/django-cms","source":"pysec"}],"references":[{"url":"https://github.com/django-cms/django-cms/security/advisories/GHSA-fwjf-m4qw-9f2x","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/django-cms/django-cms/pull/8646","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/django-cms/django-cms/pull/8647","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/django-cms/django-cms/commit/8758714b865ffa79c6bcd0e5c503958ea48885aa","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/django-cms/django-cms/commit/d5dc1efa18d157445491c4b12c2dd1efd56f439f","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/django-cms/django-cms/releases/tag/5.0.8","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/django-cms/django-cms/releases/tag/5.1.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54625","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/django-cms/django-cms","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/django-cms","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-fwjf-m4qw-9f2x","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-20T19:45:03.782Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54625","url":"https://www.cve.org/CVERecord?id=CVE-2026-54625","licence":"CVE Terms of Use","modified":"2026-08-20T19:45:17.403Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fwjf-m4qw-9f2x","url":"https://github.com/advisories/GHSA-fwjf-m4qw-9f2x","licence":"CC-BY-4.0","modified":"2026-09-10T12:25:34.887Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54625","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54625","licence":"Public domain","modified":"2026-10-26T10:10:00.140Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3824","url":"https://osv.dev/vulnerability/PYSEC-2026-3824","licence":"CC-BY-4.0","modified":"2026-09-10T12:15:05.544Z"}],"updatedAt":"2026-11-25T22:59:34.677Z","epss":{"score":0.00147,"percentile":0.04158,"date":"2026-12-01T12:00:22.000Z"}}